i have several Tomcat servers, behind a NetScaler load-balancer, which does SSL offloading. i've added the following line to server.xml on all of them:
<Valve className="org.apache.catalina.valves.RemoteIpValve"
remoteIpHeader="x-forwarded-for" protocolHeader="x-forwarded-proto" />
this works in all but 2 (identical) servers. i'm trying to get it to work on those two.
i've sniffed the traffic, and it contains the x-forwarded-proto
header, with a value of https
, as it should be.
the returned result for request.getHeader("x-forwarded-proto")
is https
.
however, request.getScheme()
returns http
and request.isSecure()
returns false
.
how can i get the remoteIpValve working?
thanks.