From a9f9b8a50040dc0c7708d39f4475ae5c7984d12f Mon Sep 17 00:00:00 2001 From: packetcat Date: Tue, 7 Nov 2023 18:34:43 -0500 Subject: [PATCH] fix positioning of blockbots snippet --- ubuntu/erlking.silvestris.systems.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ubuntu/erlking.silvestris.systems.yml b/ubuntu/erlking.silvestris.systems.yml index 98abfdd..04fcf58 100644 --- a/ubuntu/erlking.silvestris.systems.yml +++ b/ubuntu/erlking.silvestris.systems.yml @@ -217,6 +217,10 @@ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass php; } + blockbots: + - if ($http_user_agent ~* (thesis-research-bot|fidget-spinner-bot) ) { + return 403; + } nginx_configs: gzip: - gzip on @@ -237,9 +241,4 @@ - fastcgi_cache_key "$scheme$request_method$host$request_uri" - fastcgi_cache_use_stale error timeout invalid_header http_500 - fastcgi_ignore_headers Cache-Control Expires Set-Cookie - - add_header rt-Fastcgi-Cache $upstream_cache_status - nginx_snippets: - blockbots: - - if ($http_user_agent ~* (thesis-research-bot|fidget-spinner-bot) ) { - return 403; - } \ No newline at end of file + - add_header rt-Fastcgi-Cache $upstream_cache_status \ No newline at end of file