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
The application is executed in Tomcat 8 using the Servlet connector, behind an Apache HTTPD which is configured as reverse proxy. The reverse proxy sets the X-Forwarded-For header correctly, but the method request.getClientInfo().getUpstreamAddress() returns the IP of the proxy, and not the IP as specified by X-Forwarded-For.
The header can be accessed directly using request.getHeaders().getFirstValue("x-forwarded-for", true) on the very same request, so something seems to be broken in the convenience method ClientInfo.getUpstreamAddress().
I am calling getContext().getParameters().add("useForwardedForHeader", "true") in the Restlet's createInboundRoot() method, I don't know whether that's needed for the Servlet connector though.
The Restlet version in use is 2.3.12 on OpenJDK 1.8.0_191.
The text was updated successfully, but these errors were encountered:
The application is executed in Tomcat 8 using the Servlet connector, behind an Apache HTTPD which is configured as reverse proxy. The reverse proxy sets the X-Forwarded-For header correctly, but the method
request.getClientInfo().getUpstreamAddress()
returns the IP of the proxy, and not the IP as specified by X-Forwarded-For.The header can be accessed directly using
request.getHeaders().getFirstValue("x-forwarded-for", true)
on the very same request, so something seems to be broken in the convenience methodClientInfo.getUpstreamAddress()
.I am calling
getContext().getParameters().add("useForwardedForHeader", "true")
in the Restlet'screateInboundRoot()
method, I don't know whether that's needed for the Servlet connector though.The Restlet version in use is 2.3.12 on OpenJDK 1.8.0_191.
The text was updated successfully, but these errors were encountered: