zeratax / matrix-registration

a token based matrix registration api
https://zeratax.github.io/matrix-registration/
MIT License
226 stars 41 forks source link

fix: Support IP logging behind a reverse proxy #85

Closed timmc closed 2 years ago

timmc commented 2 years ago

Previously, this would always log the proxy's internal address, if behind a reverse proxy, or the real remote address if not. By combining the apparent remote_addr with the XFF chain, we can get the best possible information without having to know whether we're behind a proxy. (This assumes the proxy is set up to append to the XFF chain, so the example in the README is updated and corrected.)

This is to address https://github.com/ZerataX/matrix-registration/issues/82

xelantro commented 2 years ago

Please sync you branch with master so the changes form #86 take effect

xelantro commented 2 years ago

I fucked the syntax again, please sync another time :/ checks passed on main now

xelantro commented 2 years ago

Checks passed, ready to be merged Just wanting the repo owner to do a last sign off

xelantro commented 2 years ago

Thanks for your work!