[mod] duckduckgo: restore Sec-Fetch-* headers to prevent rate limits

This commit is contained in:
Nicolas Dato
2026-04-04 15:44:35 +00:00
committed by GitHub
parent c980fa1efc
commit e92f6b70a0

View File

@@ -379,6 +379,12 @@ def request(query: str, params: "OnlineParams") -> None:
# The vqd value is generated from the query and the UA header. To be able to
# reuse the vqd value, the UA header must be static.
headers["User-Agent"] = _HTTP_User_Agent
headers["Sec-Fetch-Dest"] = "document"
headers["Sec-Fetch-Mode"] = "navigate"
headers["Sec-Fetch-Site"] = "same-origin"
headers["Sec-Fetch-User"] = "?1"
headers["Referer"] = "https://html.duckduckgo.com/"
ui_lang = params["searxng_locale"]