From 3047dcfd4bba9546b18eca04e3ec74c2c2f7ac97 Mon Sep 17 00:00:00 2001 From: WeebDataHoarder Date: Thu, 1 May 2025 16:15:28 +0200 Subject: [PATCH] examples/forgejo: Restrict meta tag fetching for likely bots --- examples/forgejo.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/examples/forgejo.yml b/examples/forgejo.yml index a7f0ab1..e9e12c7 100644 --- a/examples/forgejo.yml +++ b/examples/forgejo.yml @@ -276,13 +276,6 @@ rules: fail-settings: challenges: [js-pow-sha256, http-cookie-check] - - name: suspicious-fetchers - action: check - settings: - challenges: [js-pow-sha256] - conditions: - - 'userAgent.contains("facebookexternalhit/") || userAgent.contains("facebookcatalog/")' - # Allow PUT/DELETE/PATCH/POST requests in general - name: non-get-request action: pass @@ -292,6 +285,10 @@ rules: # Enable fetching OpenGraph and other tags from backend on these paths - name: enable-meta-tags action: context + conditions: + - 'userAgent.contains("facebookexternalhit/") || userAgent.contains("Facebot/") || userAgent.contains("Twitterbot/")' + - '($is-generic-robot-ua)' + - '!($is-generic-browser)' settings: context-set: # Map OpenGraph or similar tags back to the reply, even if denied/challenged