Amazon ELB not Passing "X-Forwarded-For" to IIS
5,149
It sounds like you're using Layer 4 instead of layer 7. Change the front-end protocol (called 'load balancer protocol' in the console settings) from SSL(Secure TCP) to HTTPS (Secure HTTP).
Related videos on Youtube
Author by
Chad Decker
Updated on September 18, 2022Comments
-
Chad Decker over 1 year
ELB is setup to accept public HTTPS (443) connections and send them on as HTTP (80) to the EC2 instances.
The EC2 instances run an IIS app that needs to know the user's IP address. According to everything I've read on this site and elsewhere, ELB is supposed to stash that information in a header named "X-Forwarded-For". For whatever reason, ELB doesn't seem to be passing that particular header to IIS (or IIS is stripping it out?).
Any idea what I could be doing wrong?
-
Chad Decker about 11 yearsSure enough, that did it. Thanks. I wouldn't have thought to look there.