Thanks to visit codestin.com
Credit goes to github.com

Skip to content

phase one of pep 676 finalization, temporary redirects to peps.python.org #2006

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 1 commit into from
Mar 9, 2022
Merged
Changes from all commits
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
12 changes: 12 additions & 0 deletions config/nginx.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,18 @@ http {
return 302 https://www.python.org/dev/peps/;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The redirects above could have been updated too

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just getting the minimum in place before we transition to permanent redirects. Once this has been out in the wild for a bit, I'll simplify the whole setup.

Also plan to add a Surrogate-Key so we can purge all the redirects being dispatched from Nginx.

location ~ ^/dev/peps/?(.*)$ {
return 302 https://peps.python.org/$1/;
}

location ~ ^/peps/(.*)\.html$ {
return 302 https://peps.python.org/$1/;
}

location ^/(dev/)?peps(/.*)?$ {
return 302 https://peps.python.org/;
}

location ~ ^/sf(.*)$ {
if ($is_args != "") {
return 302 http://legacy.python.org/sf?$args;
Expand Down