Home › Forums › AWS › AWS Certified Advanced Networking – Specialty › X-Forwarded-For Header – Possible Answer Error › Reply To: X-Forwarded-For Header – Possible Answer Error
-
Hi Milo,
Thank you for posting your message. First of all, we would like to apologize for our late response.
Regarding the X-Forwarded-For header, you can take a look at this statement from the official AWS documentation which mentions that the LAST IP address is the one most likely to be associated with the user’s geographic location.
- If your web server is connected to the internet through a load balancer, a web server variable might contain the IP address of the load balancer, not the IP address of the user. In this configuration, we recommend that you use the last IP address in the X-Forwarded-For
HTTP header. This header typically contains more than one IP address, most of which are for proxies or load balancers. The last IP address in the list is the one most likely to be associated with the user’s geographic location.
Reference:
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/georestrictions.htmlRegards,
Jon Bonso @ Tutorials Dojo
- If your web server is connected to the internet through a load balancer, a web server variable might contain the IP address of the load balancer, not the IP address of the user. In this configuration, we recommend that you use the last IP address in the X-Forwarded-For