You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, the logging in rest-server will always log the IP address of the connection, which in many cases will be the nearest proxy.
Adding support for the X-Forwarded-For headers will allow the logging to display the correct external IP.
Currently 'gorilla/handlers' is used for logging. 'gorilla/handlers' fully supports decoding the X-Forwarded-For headers if
you add the proxyHeaders middleware before the logging middleware.
I'm currently using the following patch (against master) to implemented the additional middleware:
Hi,
By default, the logging in rest-server will always log the IP address of the connection, which in many cases will be the nearest proxy.
Adding support for the
X-Forwarded-For
headers will allow the logging to display the correct external IP.Currently 'gorilla/handlers' is used for logging. 'gorilla/handlers' fully supports decoding the
X-Forwarded-For
headers ifyou add the
proxyHeaders
middleware before the logging middleware.I'm currently using the following patch (against master) to implemented the additional middleware:
As a result, my logs now show the correct external IP, instead of the IP address of my proxy.
Any thoughts?
The text was updated successfully, but these errors were encountered: