Преглед на файлове

feat(data): add x-firefox-ai default challenge rule (#580)

Signed-off-by: Xe Iaso <me@xeiaso.net>
Xe Iaso преди 3 седмици
родител
ревизия
cd8a7eb2e2
променени са 3 файла, в които са добавени 7 реда и са изтрити 0 реда
  1. 2 0
      data/botPolicies.yaml
  2. 4 0
      data/clients/x-firefox-ai.yaml
  3. 1 0
      docs/docs/CHANGELOG.md

+ 2 - 0
data/botPolicies.yaml

@@ -30,6 +30,8 @@ bots:
   #   - Marginalia
   #   - Mojeek
   - import: (data)/crawlers/_allow-good.yaml
+  # Challenge Firefox AI previews
+  - import: (data)/clients/x-firefox-ai.yaml
 
   # Allow common "keeping the internet working" routes (well-known, favicon, robots.txt)
   - import: (data)/common/keep-internet-working.yaml

+ 4 - 0
data/clients/x-firefox-ai.yaml

@@ -0,0 +1,4 @@
+# https://connect.mozilla.org/t5/firefox-labs/try-out-link-previews-in-firefox-labs-138-and-share-your/td-p/92012
+- name: x-firefox-ai
+  action: CHALLENGE
+  expression: '"X-Firefox-Ai" in headers'

+ 1 - 0
docs/docs/CHANGELOG.md

@@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - Add `--target-insecure-skip-verify` flag/envvar to allow Anubis to hit a self-signed HTTPS backend
 - Minor adjustments to FreeBSD rc.d script to allow for more flexible configuration.
 - Added Podman and Docker support for running Playwright tests
+- Add a default rule to throw challenges when a request with the `X-Firefox-Ai` header is set.
 - Updated the nonce value in the challenge JWT cookie to be a string instead of a number
 - Rename cookies in response to user feedback
 - Ensure cookie renaming is consistent across configuration options