mirror of
https://github.com/searxng/searxng.git
synced 2026-06-07 10:27:54 +02:00
[fix] online engines: remove HTTP Sec-Fetch-* headers
The Sec-Fetch-* headers seem to cause more problems than they solve. They will be removed for now. Related: - https://github.com/searxng/searxng/pull/5758#pullrequestreview-3834221131 Suggested-by: @Bnyro Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
committed by
Markus Heiser
parent
2e6eeb1d79
commit
029b74e4f5
@@ -87,12 +87,6 @@ def request(query: str, params: "OnlineParams") -> None:
|
||||
params["url"] = None
|
||||
return
|
||||
|
||||
if params["pageno"] > 1 and ddg_category in ["videos", "news"]:
|
||||
# DDG has limited results for videos and news and we got already all
|
||||
# results from the first request.
|
||||
params["url"] = None
|
||||
return
|
||||
|
||||
# HTTP headers
|
||||
# ============
|
||||
|
||||
@@ -102,11 +96,6 @@ def request(query: str, params: "OnlineParams") -> None:
|
||||
headers["User-Agent"] = _HTTP_User_Agent
|
||||
vqd = get_vqd(query=query, params=params) or fetch_vqd(query=query, params=params)
|
||||
|
||||
# Sec-Fetch-* headers are already set by the ``OnlineProcessor``.
|
||||
# Overwrite the default Sec-Fetch-* headers to fit to a XHTMLRequest
|
||||
headers["Sec-Fetch-Dest"] = "empty"
|
||||
headers["Sec-Fetch-Mode"] = "cors"
|
||||
|
||||
headers["Accept"] = "*/*"
|
||||
headers["Referer"] = "https://duckduckgo.com/"
|
||||
headers["Host"] = "duckduckgo.com"
|
||||
|
||||
Reference in New Issue
Block a user