From 69e8fffd182960e50886b78d9785cf77112acab6 Mon Sep 17 00:00:00 2001 From: David Steinberg Date: Mon, 24 Oct 2022 15:26:22 -0700 Subject: [PATCH 1/2] Add a header for noindex and nofollow This will hopefully stop most search engines from indexing non-production Dockstore instances --- templates/default.nginx_http.security.conf.template | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/default.nginx_http.security.conf.template b/templates/default.nginx_http.security.conf.template index e692a95..e177735 100644 --- a/templates/default.nginx_http.security.conf.template +++ b/templates/default.nginx_http.security.conf.template @@ -27,3 +27,7 @@ proxy_hide_header Server; add_header X-Content-Type-Options "nosniff" always; add_header Strict-Transport-Security $hsts_header always; + +{{^PRODUCTION}} +add_header X-Robots-Tag "noindex, nofollow" always; +{{/PRODUCTION}} \ No newline at end of file From 7eeccb9f607e2a487d845a9c6b0125abfac28769 Mon Sep 17 00:00:00 2001 From: David Steinberg Date: Wed, 26 Oct 2022 09:35:01 -0700 Subject: [PATCH 2/2] Add newline end of file --- templates/default.nginx_http.security.conf.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/default.nginx_http.security.conf.template b/templates/default.nginx_http.security.conf.template index e177735..c740558 100644 --- a/templates/default.nginx_http.security.conf.template +++ b/templates/default.nginx_http.security.conf.template @@ -30,4 +30,4 @@ add_header Strict-Transport-Security $hsts_header always; {{^PRODUCTION}} add_header X-Robots-Tag "noindex, nofollow" always; -{{/PRODUCTION}} \ No newline at end of file +{{/PRODUCTION}}