From da3e988060bea71621a70d6112842d84c0f91020 Mon Sep 17 00:00:00 2001 From: Felix Date: Mon, 13 Jan 2020 11:17:04 +0100 Subject: [PATCH] Prevent crawlers with robots.txt --- templates/nginx.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/nginx.conf b/templates/nginx.conf index fc84323..329d054 100644 --- a/templates/nginx.conf +++ b/templates/nginx.conf @@ -162,6 +162,10 @@ ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECD proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } + location = /robots.txt { + add_header Content-Type text/plain; + return 200 "User-agent: *\nDisallow: /\n"; + } } # Anonymize IP addresses