From 8cbf3b0e64b1de6f5898e47b298ff843eb0922e3 Mon Sep 17 00:00:00 2001 From: staticsafe Date: Sat, 20 Mar 2021 18:41:23 -0400 Subject: [PATCH] add blockbots nginx snippet and use it in TF vhost --- ubuntu/deirdre.asininetech.net.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ubuntu/deirdre.asininetech.net.yml b/ubuntu/deirdre.asininetech.net.yml index e730a49..a85390d 100644 --- a/ubuntu/deirdre.asininetech.net.yml +++ b/ubuntu/deirdre.asininetech.net.yml @@ -30,6 +30,7 @@ - add_header Referrer-Policy "no-referrer, strict-origin-when-cross-origin" - add_header Strict-Transport-Security max-age=31536000 - add_header Access-Control-Allow-Origin * + - include snippets/blockbots.conf - client_max_body_size 0 - location / { try_files $uri @proxy; @@ -96,3 +97,8 @@ - ssl_session_timeout 1d - ssl_session_cache shared:SSL:50m - ssl_session_tickets off + nginx_snippets: + blockbots: + - if ($http_user_agent ~* (LanaiBotmarch) ) { + return 403; + }