On 05/03/17 18:37, Nick Johnson wrote: Please configure your e-mail client to quote text you reply to. It makes conversations much easier to follow.
>> On Mar 5, 2017 9:50 AM, "Mark Thomas" <ma...@apache.org> wrote: >> >> On 04/03/17 04:33, Nick Johnson wrote: >>> Greetings, >>> >>> I have observed that with the default configuration where the <Host> name >>> is 'localhost', Tomcat will change the Host and X-Forwarded-Host headers >> to >>> the IP address of the local machine. >> >> That is not correct. Tomcat makes no changes to the Host or >> X-Forwarded-Host header it receives in the default configuration. > > Are there any configuration modifications that could cause this behavior to > manifest? The RemoteIpValve and RemoteIpFilter will modify the values an application sees for those headers. > Running nc or tcpdump on the command line, I see the correct Host and > X-Forwarded-Host headers arriving for Tomcat, but from my application, the > Host header and X-Forwarded-Host header both contain the IP address of the > local machine. How are you obtaining the header values? > Using the same war file in a different container (Jetty), I do not observe > this behavior. > > I also do not observe this behavior if the Host header matches either the > <Host> name or an <Alias> name. Those have no impact on the value of the HTTP Host header. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org