Hello,
I've come around a strange wildfly behaviour - when "proxy-address-forwarding=true" is specified, x-forwarded-for is still not used in response Location.
The setup is simple, servlet, redirecting to a non-existent url:
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.sendRedirect("kek");
}
It is deployed on wildfly 10.0.0.Final with everything on default, only added this line to standalone.xml:
<http-listener name="default" socket-binding="http" proxy-address-forwarding="true"/>
Now, when i try to emulate a proxy request with curl, like this: curl http://localhost:18080/redirectApp/PageRedirect -v -H "X-Forwarded-For:192.168.1.1" -H "X-Forwarded-Proto:http" -ks, what i expect is Location in redirect be replaced with the value from x-forwarded-for provided by curl command. One strange thing is that Proto value is indeed used, i can replace -H "X-Forwarded-Proto:http" with "https" and it will be replaced in response Location, but not x-forwarded-for.
What might be the reason of such behaviour?