From 7af73621bbf64c6459fb1c37852f2856eec773d8 Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Thu, 29 Aug 2024 01:46:31 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20d'une=20r=C3=A8gle=20pour=20ignorer=20l?= =?UTF-8?q?es=20bots?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deployment/scripts/nginx/nginx.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deployment/scripts/nginx/nginx.conf b/deployment/scripts/nginx/nginx.conf index c042fbe..1902f1c 100644 --- a/deployment/scripts/nginx/nginx.conf +++ b/deployment/scripts/nginx/nginx.conf @@ -32,5 +32,9 @@ http { error_page 502 /static/html/500.html; error_page 503 /static/html/500.html; + if ($http_user_agent ~* "(?:acunetix|BLEXBot|domaincrawler\.com|LinkpadBot|MJ12bot/v|majestic12\.co\.uk|AhrefsBot|TwengaBot|SemrushBot|nikto|winhttp|Xenu\s+Link\s+Sleuth|Baiduspider|HTTrack|clshttp|harvest|extract|grab|miner|python-requests|Amazonbot)") { + return 444; + } + } }