summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAadniz <8147434+Aadniz@users.noreply.github.com>2026-04-05 03:59:39 +0200
committerGitHub <noreply@github.com>2026-04-05 03:59:39 +0200
commit474b0a55b0cb09a3bb6e18d5579836058b075584 (patch)
tree50d434af20a6c081025b74d0e93fe3e68859ef95
parent69f04d59dc1ac0707f91a962e8c18c388ae0294e (diff)
[fix] karmasearch engine: setting Referer header to bypass bot detection (#5953)
-rw-r--r--searx/engines/karmasearch.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/searx/engines/karmasearch.py b/searx/engines/karmasearch.py
index 140002c3c..a019ec885 100644
--- a/searx/engines/karmasearch.py
+++ b/searx/engines/karmasearch.py
@@ -64,6 +64,9 @@ def request(query: str, params: "OnlineParams") -> None:
if params["time_range"]:
args["freshness"] = time_range_map[params["time_range"]]
+ # Needed to circumvent Cloudflare bot protection
+ params['headers']['Referer'] = "https://karmasearch.org"
+
params["url"] = f"{base_url}/search/{search_type}?{urlencode(args)}"