-
Notifications
You must be signed in to change notification settings - Fork 182
nginx: obscure internal rewrite URLs #991
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
Open
alxndrsn
wants to merge
31
commits into
getodk:next
Choose a base branch
from
alxndrsn:test-redirect-rewrites
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 tasks
This reverts commit 456de9c.
Just FYI, we're currently thinking that we should wait for .2 to try to merge this PR. We're hoping to start regression testing early next week. Let me know if that doesn't sound right! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TODO
Noted while working on #984:
Current setting
proxy_redirect off
prevents nginx from converting URLs likehttp://enketo:8005/v1
to external URLs.This is not a feature that's required. Reverting to the default
proxy_redirect
config will:See: https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_redirect
What has been done to verify that this works as intended?
proxy_redirect
directive changes and checked the new tests now fail: buildWhy is this the best possible solution? Were any other approaches considered?
This rule's meaning is subtle.
The change introduces inconsistency, in that redirects are only rewritten if they match the
location
block in which theproxy_pass
is defined.However, it doesn't seem like preserving internal URLs would ever by desirable, so reducing the occasions they can occur is probably helpful.
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
No effect.
Does this change require updates to documentation? If so, please file an issue here and include the link below.
No.
Before submitting this PR, please make sure you have:
next
branch OR only changed documentation/infrastructure (master
is stable and used in production)