Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
X-Forwarded-Proto
for WebSockets scheme when the proxy provides…
… 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]>
- Loading branch information