Commit b0a7af3
committed
Fixed incorrect parsing of the HTTP X-Forwarded-For header when the --ip-header commandline option is used in server mode.
We should not assume that the X-Forwarded-For header (and synonyms) contain only the client's IP address. The header can contain a comma-separated list that also includes proxies in the chain.
See the following:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-For1 parent ff0c02e commit b0a7af3
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
217 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
218 | 221 | | |
219 | 222 | | |
220 | 223 | | |
221 | | - | |
| 224 | + | |
222 | 225 | | |
223 | 226 | | |
224 | 227 | | |
| |||
0 commit comments