From 474b0a55b0cb09a3bb6e18d5579836058b075584 Mon Sep 17 00:00:00 2001 From: Aadniz <8147434+Aadniz@users.noreply.github.com> Date: Sun, 5 Apr 2026 03:59:39 +0200 Subject: [PATCH] [fix] karmasearch engine: setting Referer header to bypass bot detection (#5953) --- searx/engines/karmasearch.py | 3 +++ 1 file changed, 3 insertions(+) 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)}"