summaryrefslogtreecommitdiff
path: root/searx/engines/azure.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2025-11-21 08:16:24 +0100
committerGitHub <noreply@github.com>2025-11-21 08:16:24 +0100
commitca441f419ca2e3a4a6cf90ac853a3ff6d69df967 (patch)
tree85d4cb7f4f52467d596157e7f66d92531619e6bc /searx/engines/azure.py
parent04e66a2bb4dd412c4a60212ebc30d8a4cc983d45 (diff)
[fix] engines - set hard timouts in *sub-request* (#5460)
The requests changed here all run outside of the network context timeout, thereby preventing the engine's timeout from being applied (the engine's timeout can become longer than it was configured). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/engines/azure.py')
-rw-r--r--searx/engines/azure.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/engines/azure.py b/searx/engines/azure.py
index 35538b561..4c916bc3b 100644
--- a/searx/engines/azure.py
+++ b/searx/engines/azure.py
@@ -95,7 +95,7 @@ def authenticate(t_id: str, c_id: str, c_secret: str) -> str:
"scope": "https://management.azure.com/.default",
}
- resp: SXNG_Response = http_post(url, body)
+ resp: SXNG_Response = http_post(url, body, timeout=5)
if resp.status_code != 200:
raise RuntimeError(f"Azure authentication failed (status {resp.status_code}): {resp.text}")
return resp.json()["access_token"]