From 4506461f6312f561b6537c57a4fca7e4da155037 Mon Sep 17 00:00:00 2001 From: Matthias Kunnen Date: Mon, 15 Jan 2024 05:35:55 +0100 Subject: [PATCH] Re-add headers to requests for / Bug introduced in a174dd5d66dd366ea5152f903984ef078130ff02. --- nginx.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nginx.conf b/nginx.conf index aa21b9b56..77af8ab65 100644 --- a/nginx.conf +++ b/nginx.conf @@ -81,6 +81,16 @@ http { } location ~ \.html$ { + # location executed for: /, /Items.html + if ($request_uri ~ "^/(\?|$)") { + # Headers need to be repeated when / is fetched + add_header Cache-Control "no-cache"; + add_header Referrer-Policy "same-origin"; + add_header Strict-Transport-Security "max-age=63072000"; + add_header X-Content-Type-Options "nosniff"; + add_header X-XSS-Protection "1; mode=block"; + } + if ($request_uri ~ "^/index.html(\?|$)") { # Prevent serving duplicate content, do not serve /index.html. return 301 /;