> I've got a very basic valve for now to handle this kind of X-Forwarded > situation : > > > public class ForwardedValve extends ValveBase { > > public void invoke(Request paramRequest, Response paramResponse) > throws IOException, ServletException { > > String header = paramRequest.getHeader("X-Forwarded-Host"); > > if (header != null) > paramRequest.setServerName(header); > > int header1 = paramRequest.getIntHeader("X-Forwarded-Port"); > > if (header1 > 0) > paramRequest.setServerPort(header1); > > getNext().invoke(paramRequest, paramResponse); > } > }
Any comments about this valve ? FYI, it's the kind of valve required by a Tomcat behind Amazon AWS Load Balancer. I'll detail more later but the current ForwardedValve only handle remote (browser) information and not the local (server) address. Cheers. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org