-
-
Notifications
You must be signed in to change notification settings - Fork 672
Get IP from "standard" HTTP headers #3287
Comments
Change somewhere here (or in this file): dendrite/syncapi/sync/requestpool.go Lines 176 to 204 in d65449c
|
Thanks, I think (hope) that's not beyond my abilities. Will create a PR once I mange to take care of that. |
I think it's necessary. |
None of these headers are safe to trust in the default configuration, unless Dendrite will never use the information for anything important. To be trustworthy the IP header must be set by a trusted reverse proxy that also discards any (potentially spoofed) information it receives in these headers. The various proxy implementations have different default behaviours, might not be using their defaults, or the admin might not be using a proxy at all. |
...
But, if I may, do you think Dendrite should perhaps auto-try any of the standard "this is the client's real IP" headers automatically? Do you see any downsides in doing that? For what it's worth, from my limited self-hosting experience, many applications do it automatically, given the current trends in hosting stuff (everything behind reverse proxy or ingress or whatever)
Best regards
Zbig
Originally posted by @zbig-t in #3286 (comment)
The text was updated successfully, but these errors were encountered: