summaryrefslogtreecommitdiff
path: root/searx/botdetection
diff options
context:
space:
mode:
authorBrock Vojkovic <brockv@tuta.io>2025-05-07 16:38:21 +0800
committerGitHub <noreply@github.com>2025-05-07 10:38:21 +0200
commitff60fe635fc5792b45cef70cd7716b694901393c (patch)
treee21bf8caebd40cf3d2e41021587ccce7b00609a8 /searx/botdetection
parent6e7119fa4e8f5eef1dbfcd8dfb88d72ef84fba08 (diff)
[fix] sec-fetch-* blocking infinite scroll (#4728)
Diffstat (limited to 'searx/botdetection')
-rw-r--r--searx/botdetection/http_sec_fetch.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/botdetection/http_sec_fetch.py b/searx/botdetection/http_sec_fetch.py
index ead798b5e..5f16d1d9b 100644
--- a/searx/botdetection/http_sec_fetch.py
+++ b/searx/botdetection/http_sec_fetch.py
@@ -86,7 +86,7 @@ def filter_request(
user_agent = request.headers.get('User-Agent', '')
if is_browser_supported(user_agent):
val = request.headers.get("Sec-Fetch-Mode", "")
- if val != "navigate":
+ if val not in ('navigate', 'cors'):
logger.debug("invalid Sec-Fetch-Mode '%s'", val)
return flask.redirect(flask.url_for('index'), code=302)
@@ -96,7 +96,7 @@ def filter_request(
flask.redirect(flask.url_for('index'), code=302)
val = request.headers.get("Sec-Fetch-Dest", "")
- if val != "document":
+ if val not in ('document', 'empty'):
logger.debug("invalid Sec-Fetch-Dest '%s'", val)
flask.redirect(flask.url_for('index'), code=302)