8000 Use Surrogate-Key headers for docs.python.org by AA-Turner · Pull Request #510 · python/psf-salt · GitHub
[go: up one dir, main page]

Skip to content

Use Surrogate-Key headers for docs.python.org #510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add header only if content-negotiation emulation fails
  • Loading branch information
AA-Turner committed Oct 9, 2024
commit 08177457ce2d91f621f5105539eefa3883b5a7fe
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
Loading
0