Skip to content

Commit

Permalink
Add header only if content-negotiation emulation fails
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Oct 9, 2024
1 parent 26750c9 commit 0817745
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion salt/docs/config/nginx.docs-redirects.conf
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@ location ~ ^/(searchindex.js|objects.inv)$ {
# Redirect ``$request_uri`` -> ``$request_uri.html``,
# where the latter is a valid webpage.
location ~ ^/((2|3)(\.[0-9]+)?|dev)/\w+/[\d\w\.]+(?!\.html)$ {
add_header Surrogate-Key en/$1 always;
if (-f "${request_filename}.html") {
return 301 https://$host:$request_uri.html;
}
add_header Surrogate-Key en/$1 always;
}

# Add the Surrogate-Key for bulk CDN purging
Expand Down

0 comments on commit 0817745

Please sign in to comment.