From 823c490c84a04447a2bc0198d0b168c6b81d6ce2 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sun, 30 Apr 2023 09:49:26 +0200 Subject: [PATCH] [mod] limiter: block requests from PetalBot Block requests from PetalBlock. Normally robots.txt is enough to stop PetalBlock from making requests [1]. However, if SearXNG is offered below a path (example.org/search), then the robots.txt is not available in the root paths of the domain / subdomain. [1] https://webmaster.petalsearch.com/site/petalbot Signed-off-by: Markus Heiser --- searx/plugins/limiter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/searx/plugins/limiter.py b/searx/plugins/limiter.py index 72be33910..46c82f588 100644 --- a/searx/plugins/limiter.py +++ b/searx/plugins/limiter.py @@ -37,6 +37,7 @@ block_user_agent = re.compile( # unmaintained Farside instances + r'|' + re.escape(r'Mozilla/5.0 (compatible; Farside/0.1.0; +https://farside.link)') + + '|.*PetalBot.*' + r')' )