Ends in
00
days
00
hrs
00
mins
00
secs
SHOP NOW

💝 Valentine's Sale! Get 30% OFF Any Reviewer. Use coupon code: PASSION-4-CLOUD & 10% OFF Store Credits/Gift Cards

Find answers, ask questions, and connect with our
community around the world.

Home Forums AWS AWS Certified Advanced Networking – Specialty X-Forwarded-For Header – Possible Answer Error Reply To: X-Forwarded-For Header – Possible Answer Error

  • aal

    Member
    January 30, 2025 at 6:26 am

    @Milo, I had the exact same question. I actually created a support ticket with AWS to ask what was the apparent inconsistent info between the AWS docs and the MDN docs. Here’s what AWS said:

    Hello,

    This is XXXXX from AWS again. Thank you for your patience while I was still going through the case.

    I understand that you want clarity on the documentation.

    Please feel free to correct me if I misunderstood your query.

    Q1). My understanding is that the FIRST IP address in the x-forwarded-for header is the client IP?

    Yes, you are right, the first IP appended in the X-Forwarded-For header
    is the IP address of the Client. The AWS documentation isn’t exactly wrong,
    rather it is making a recommendation and not a statement of fact. It’s
    suggesting a best practice in a case where a load balancer is positioned
    in front of the web server, the IP address in the connection may not
    accurately reflect the client’s true location. In such cases, the
    document recommends using the X-Forwarded-For (XFF) header to obtain a
    more precise indication of the client’s origin. The last IP in the list
    should be the proxy that connected to the load balancer. ie. is most
    likely where the user entered the Internet.

    In case you have any follow up questions or any other concerns please do
    not hesitate to contact me, I will be more than happy to assist.

Skip to content