Skip to content

Commit

Permalink
Re-add headers to requests for /
Browse files Browse the repository at this point in the history
Bug introduced in a174dd5.
  • Loading branch information
MatthiasKunnen committed Jan 15, 2024
1 parent 1d78357 commit 4506461
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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 /;
Expand Down

0 comments on commit 4506461

Please sign in to comment.