Skip to content
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

Redirect index files in proxito instead of serving #6387

Merged
merged 5 commits into from Nov 19, 2019

Conversation

@ericholscher
Copy link
Member

ericholscher commented Nov 18, 2019

This lets us just return a redirect if the file exists. This matches the
existing nginx behavior, except it actually appends the index filename
instead of just a slash.

I'm not sure which is better, but this is more explicit which feels good.

This lets us just return a redirect if the file exists.
This matches the existing nginx behavior,
except it actually appends the index filename instead of just a slash.

I'm not sure which is better,
but this is more explicit which feels good.
@ericholscher ericholscher requested a review from humitos Nov 18, 2019
@humitos

This comment has been minimized.

Copy link
Member

humitos commented Nov 18, 2019

We had a discussion on Slack. The first approach had a problem that users will see the index.html in the URL when they weren't hitting an URL with a trailing slash --which would be a problem for people using dirhtml builder.

So, we decided to change this behavior to redirect to the same URL with a trailing slash if the index.html file exists. This redirect will be caught again by El Proxito and return the X-Accel header that will be include the full path but the user won't see the index.html in the URL.

Copy link
Member

humitos left a comment

Happy to be pretty close to test El Proxito in production :)

@ericholscher ericholscher merged commit 2a83be0 into master Nov 19, 2019
1 of 3 checks passed
1 of 3 checks passed
continuous-documentation/read-the-docs Read the Docs build is in progress!
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
pyup.io/safety-ci No dependencies with known security vulnerabilities.
Details
@ericholscher ericholscher deleted the proxito-redirect branch Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.