From f0b2a90bce34fc13b0df4affd8b3158d57bcf904 Mon Sep 17 00:00:00 2001 From: Alex Anderson <191496+alxndrsn@users.noreply.github.com> Date: Fri, 5 Apr 2024 09:05:43 +0300 Subject: [PATCH] Add robots.txt (#621) See: * http://www.robotstxt.org/robotstxt.html * https://serverfault.com/questions/549332/how-to-set-robots-txt-globally-in-nginx-for-all-virtual-hosts#751841 --- files/nginx/odk.conf.template | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/files/nginx/odk.conf.template b/files/nginx/odk.conf.template index 65ceea35..dc90a6ce 100644 --- a/files/nginx/odk.conf.template +++ b/files/nginx/odk.conf.template @@ -24,6 +24,11 @@ server { gzip_http_version 1.1; gzip_types text/plain text/css application/json application/x-javascript text/xml text/csv; + location = /robots.txt { + add_header Content-Type text/plain; + return 200 "User-agent: *\nDisallow: /\n"; + } + location /- { proxy_pass http://enketo:8005; proxy_redirect off;