tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject Re: Changing request address to x-forwarded-for
Date Wed, 06 Jan 2010 07:41:26 GMT
On 06/01/2010 04:14, Mohit Anchlia wrote:
> tomcat 6:
> Is it possible to inject or change remote address to what's in
> x-forwaded-for in http header such that when Servlet received the
> request it's already in the request.getRemoteAddress()? Otherwise
> we'll need to make a urgent change to read from the HTTP header. We
> didn't realize it earlier since we are using F5 LTM.

The next release of Tomcat 6 will include a new valve (RemoteIpValve) to
do exactly this. If you can't wait for the next 6.0.x release (should be
soon - hopefully next week or so) then you can always use that as the
basis to write your own valve. Alternatively, Tomcat 7 also has a filter
that does the same thing that you could use as a startign point.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message