summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)