-
-
Notifications
You must be signed in to change notification settings - Fork 747
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
Fix x_forwarded_proto
for websockets
#2043
Merged
Merged
Conversation
This file contains 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
aminalaee
force-pushed
the
fix-forwarded-proto-websocket
branch
from
July 12, 2023 13:00
fb2c3c5
to
33e37c8
Compare
Kludex
approved these changes
Jul 12, 2023
You forgot to include it in the changelog. |
We don't do that on per PR yet on |
aadnehovda
added a commit
to aadnehovda/uvicorn
that referenced
this pull request
Feb 29, 2024
Minor fix for encode#2043 Traefik already sets the X-Forwarded-Proto headers to ws or wss for websockets. https://github.com/traefik/traefik/blob/c1ef7429771104e79f2e87b236b21495cb5765f0/pkg/middlewares/forwardedheaders/forwarded_header.go#L150 This change should make sure we don't overwrite those values.
3 tasks
Kludex
added a commit
that referenced
this pull request
Mar 1, 2024
… it (#2258) * Fix X-Forwarded-Proto when the proxy already sets it to "ws" or "wss" Minor fix for #2043 Traefik already sets the X-Forwarded-Proto headers to ws or wss for websockets. https://github.com/traefik/traefik/blob/c1ef7429771104e79f2e87b236b21495cb5765f0/pkg/middlewares/forwardedheaders/forwarded_header.go#L150 This change should make sure we don't overwrite those values. * Fix the logic * Update test_proxy_headers.py Test whether passing "wss" in X-Forwarded-Proto works * Simplify the logic (probably more ways to write this... lmk which you prefer) * Update tests and min implementation * Remove new line --------- Co-authored-by: Marcelo Trylesinski <[email protected]>
cr313
added a commit
to cr313/py-project-uvicorn
that referenced
this pull request
Apr 19, 2024
… it (#2258) * Fix X-Forwarded-Proto when the proxy already sets it to "ws" or "wss" Minor fix for encode/uvicorn#2043 Traefik already sets the X-Forwarded-Proto headers to ws or wss for websockets. https://github.com/traefik/traefik/blob/c1ef7429771104e79f2e87b236b21495cb5765f0/pkg/middlewares/forwardedheaders/forwarded_header.go#L150 This change should make sure we don't overwrite those values. * Fix the logic * Update test_proxy_headers.py Test whether passing "wss" in X-Forwarded-Proto works * Simplify the logic (probably more ways to write this... lmk which you prefer) * Update tests and min implementation * Remove new line --------- Co-authored-by: Marcelo Trylesinski <[email protected]>
Kludex
added a commit
to Kludex/jik
that referenced
this pull request
Aug 14, 2024
… it (#2258) * Fix X-Forwarded-Proto when the proxy already sets it to "ws" or "wss" Minor fix for encode/uvicorn#2043 Traefik already sets the X-Forwarded-Proto headers to ws or wss for websockets. https://github.com/traefik/traefik/blob/c1ef7429771104e79f2e87b236b21495cb5765f0/pkg/middlewares/forwardedheaders/forwarded_header.go#L150 This change should make sure we don't overwrite those values. * Fix the logic * Update test_proxy_headers.py Test whether passing "wss" in X-Forwarded-Proto works * Simplify the logic (probably more ways to write this... lmk which you prefer) * Update tests and min implementation * Remove new line --------- Co-authored-by: Marcelo Trylesinski <[email protected]>
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.
Summary
Replaces #2011
Closes #1935
Checklist