crazygolem 18143fa5a1
Use the RealIP middleware also behind a reverse proxy (#2858)
* Use the RealIP middleware only behind a reverse proxy

* Fix proxy ip source in tests

* Fix test for PR#2087

The PR did not update the test after changing the behavior, but the test still
passed because another condition was preventing the user from being created in
the test.

* Use RealIP even without a trusted reverse proxy

* Use own type for context key

* Fix casing to follow go's conventions

* Do not apply RealIP middleware twice

* Fix IP source in logs

The most interesting data point in the log message is the proxy's IP, but
having the client IP too can help identify integration issues.
2024-04-25 20:43:58 -04:00
..
2022-12-28 15:31:56 -05:00
2020-10-21 21:44:03 -04:00
2024-02-07 20:45:08 -05:00
2023-03-10 23:33:29 -05:00
2023-12-27 12:44:25 -05:00
2023-12-27 20:20:29 -05:00
2023-12-27 20:20:29 -05:00
2022-09-14 21:09:39 -04:00
2023-12-09 13:52:17 -05:00
2022-12-28 15:31:56 -05:00
2023-12-09 13:52:17 -05:00
2024-02-07 20:45:08 -05:00
2023-12-09 13:52:17 -05:00