Layer 7 API Management

Expand all | Collapse all

Appending to the X-forwarded-for request.http header

Jump to Best Answer
  • 1.  Appending to the X-forwarded-for request.http header

    Posted 07-30-2018 03:01 PM

    XFF from F5 Load Balancer to API Gateway:

     

    I have an F5 Load Balancer sitting in front of our internal API Gateway.  The XFF has been enabled on this Load Balancer.  I am getting the "x-forwarded-for" value correctly.

     

    My question:  What is the best way to append my API Gateways "request.tcp.localAddress" value to the end of this request.http.header.x-forwarded-for value so that it gets passed along to the backend service?

     

    From the F5 Load Balancer:

     

    What I want it to look like when I pass it along to the backend service:

     

    Thoughts?

     

    Thanks.



  • 2.  Re: Appending to the X-forwarded-for request.http header
    Best Answer

    Posted 07-31-2018 09:28 AM

    Hi Reed,

     

    I tried using the manage transport properties but it looks like this is just creating a duplicate header using add/replace.

    You can try to concatenate this as follows using the assertion as follows:

     

     

    Regards,

    Joe



  • 3.  Re: Appending to the X-forwarded-for request.http header

    Posted 07-31-2018 12:42 PM

    Joe,

     

    Thanks so much for the quick reply.  I was able to use your approach to much "success".

     

    Reed



  • 4.  Re: Appending to the X-forwarded-for request.http header

    Posted 01-30-2019 04:24 PM

    Hi Reed,

     

    Need help on XFFsetup in F5,if possible could you please provide more details how XFF is setup in F5 even after F5 is acting as passthrough?

     

    We are trying to setup F5 as passthrough and add XFF to see actual source IP's, but it's breaking connection to servers. 

     

    Regards,

    Prem.