about summary refs log tree commit diff
path: root/bundles/go-away/files/config/snippets/bot-googlebot.yml
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/go-away/files/config/snippets/bot-googlebot.yml')
-rw-r--r--bundles/go-away/files/config/snippets/bot-googlebot.yml8
1 files changed, 8 insertions, 0 deletions
diff --git a/bundles/go-away/files/config/snippets/bot-googlebot.yml b/bundles/go-away/files/config/snippets/bot-googlebot.yml
new file mode 100644
index 0000000..da26884
--- /dev/null
+++ b/bundles/go-away/files/config/snippets/bot-googlebot.yml
@@ -0,0 +1,8 @@
+networks:
+  googlebot:
+    - url: https://developers.google.com/static/search/apis/ipranges/googlebot.json
+      jq-path: '(.prefixes[] | select(has("ipv4Prefix")) | .ipv4Prefix), (.prefixes[] | select(has("ipv6Prefix")) | .ipv6Prefix)'
+
+conditions:
+  is-bot-googlebot:
+      - &is-bot-googlebot '(userAgent.contains("+http://www.google.com/bot.html") || userAgent.contains("Google-PageRenderer") || userAgent.contains("Google-InspectionTool") || userAgent.contains("Googlebot")) && remoteAddress.network("googlebot")'
\ No newline at end of file