2011/11/22 rswart <rjsw...@gmail.com>: > > > Hi, > > I'm trying to configure the RemoteIp in combination with AccessLogValve. > request.getRemoteAddr() return the correct remote-ip from X-Forwarded-For > header, but AccessLogValve still logs the unmodified (proxy) ip-address. Can > this be related to the execution order of valves? Can I enforce the order > somehow?
No. It is not related to their order. If you need AccessLogValve to use information from RemoteIpValve you have to enable that explicitly. See "requestAttributesEnabled" in the documentation. http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html > > > Version = 7.0.22, valves: > > <Valve className="org.apache.catalina.valves.RemoteIpValve" > remoteIpHeader="X-Forwarded-For" > protocolHeader="X-Forwarded-Proto"/> > > <Valve className="org.apache.catalina.valves.AccessLogValve" > directory="logs" > prefix="${instanceId}_access." suffix=".log" > pattern="%h %{Host}i %t "%r" %s %b > %{klm_tracking_id}c %S %D" /> > Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org