Commit 0d4747e
Use
* 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 <marcelotryle@gmail.com>X-Forwarded-Proto for WebSockets scheme when the proxy provides it (#2258)1 parent 93897b5 commit 0d4747e
2 files changed
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
118 | 127 | | |
| 128 | + | |
| 129 | + | |
119 | 130 | | |
120 | 131 | | |
121 | 132 | | |
| |||
138 | 149 | | |
139 | 150 | | |
140 | 151 | | |
141 | | - | |
| 152 | + | |
142 | 153 | | |
143 | 154 | | |
144 | | - | |
| 155 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 66 | + | |
69 | 67 | | |
70 | 68 | | |
71 | 69 | | |
| |||
0 commit comments