java - How to obtain "X-Forwarded-Proto" header in REST application? -


I have a REST application running on Tomcat. I am sending http requests to https using the server.xml redirectPort parameter.

Now, on the server side, I request that the requests be redirected to the X-Forwarded-Proto header.

My code looks like this:

  @Context UriInfo uriInfo; @contact request request; Protected Response Check Security (security content sc) {string forwarded protocol} ((containeraver request)) .getHeaderValue ("X-Forward-Proto"); }   

However, it does not work. It seems that the request object only gives access to free free HTM headers.

Can someone please recommend me the best way to get the header value? thank you in advanced.

You need a tom to pay attention.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -