On 28/09/2020 16:15, Solas, Nathan wrote: > I'm using RemoteIpValve to capture protocolHeader x-forwarded-proto and > upgrade the request to secure when SSL is terminated at the load balancer - > so far so good. > > When using theServletRequest.startAsync() and then passing the work to a > threadpool executor, it seems the RemoteIpValve.invoke finally{} block > executes first and undoes all the changes to the Request object. The result > is by the time the worker picks up the request, it's demoted back to http and > nothing works. > > This was noted in 2017 with no answers, but the internet is pretty quiet > about others facing this: > https://marc.info/?l=tomcat-user&m=150971153905722&w=2 > > Maybe I'm not understanding how this should work? Seems right to me... Thanks > for any information, > Nate
You'll probably have more luck with the Filter than the Valve. One of the advantages the Filter has is that it can warp the request and/or response. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org