0 Replies Latest reply on Mar 3, 2017 6:25 AM by Dmitry Korchemkin

    Wildfly 10.0.0.FINAL not using x-forwarded-for when proxy-address-forwarding is set to true

    Dmitry Korchemkin Newbie



      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 {



      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:" -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?