summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2023-04-03 19:42:26 +0200
committerGitHub <noreply@github.com>2023-04-03 19:42:26 +0200
commit3ab85db5ddd12e1d17dab7d72ea8a7cb7ca961b5 (patch)
treed3b74645603aff7a77c92b86e9a9444fd6c698a8
parent464e69665cef7fb0b4bbd1c08578fcdd0ecfd48c (diff)
parent03f94962b63eb8e189b0b4983c0329d0c29c34ab (diff)
downloadsearxng-3ab85db5ddd12e1d17dab7d72ea8a7cb7ca961b5.tar.gz
searxng-3ab85db5ddd12e1d17dab7d72ea8a7cb7ca961b5.zip
Merge pull request #2313 from return42/limiter-route-healthz
[fix] limiter: never block a /healthz request
-rw-r--r--searx/plugins/limiter.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/searx/plugins/limiter.py b/searx/plugins/limiter.py
index e1cd0e408..2a9e6f8f5 100644
--- a/searx/plugins/limiter.py
+++ b/searx/plugins/limiter.py
@@ -47,6 +47,9 @@ def is_accepted_request() -> bool:
user_agent = request.headers.get('User-Agent', 'unknown')
x_forwarded_for = request.headers.get('X-Forwarded-For', '')
+ if request.path == '/healthz':
+ return True
+
if block_user_agent.match(user_agent):
logger.debug("BLOCK %s: %s --> detected User-Agent: %s" % (x_forwarded_for, request.path, user_agent))
return False