Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance TrustProxy to handle multiple chained proxies
This can happen if, for example, you have a first proxy at 10.10.10.1 which proxies to 10.10.10.2 which then hits your web server that passes control to Interchange. If you visit from 192.168.1.1, Interchange will see this HTTP header: X-Forwarded-For: 192.168.1.1, 10.10.10.1 and the request will have the source IP address 10.10.10.2. But if you set this in interchange.cfg: TrustProxy 10.10.10.1, 10.10.10.2 # order irrelevant then Interchange will see past the two trusted proxies and set its standard variable $CGI::remote_addr to 192.168.1.1, so that the customer's IP address gets used.
- Loading branch information