Hi,

I am debugging a scenario where Tomcat 10.1.26 is working behind an
Application Gateway on Microsoft Azure.

The webpage makes a request to /favicon.ico which goes through the
RemoteIpValve, which correctly identifies that the request is an
internal one, based on the beginning of the IPv4 address, but then
populates the http requests's remote address value with the header
"x-forwarded-for" received from Azure, which contains the port number
appended to the IP with a colon.

This seems to break the internal web application, which assumes that
ServletRequest.getRemoteAddr() only contains the hostname/IP, but not
a port number.

As far as I can see the value in x-forwarded-for is less defined, but
the value present in getRemoteAddr() is strictly something without
port number.

Is this something that can be worked around with configuration, or
does it look like a bug worth fixing in the RemoteIpValve?

Thanks,
b

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to