-
Notifications
You must be signed in to change notification settings - Fork 71
Description
We had a new situation crop up where a specific agency subdomain needed had another proxy in front of our api.data.gov service. This meant that by default, we were treating all of the traffic as though it was coming from this other proxy's IP. This in turn would skew our analytics and rate limiting, since all of the traffic would appear to come from just a couple IPs (the proxy IPs), rather than the real IPs used by the clients.
In order to fix this, we need to be able to read the original client's IP address from a different HTTP header. Normally, we read this information from the X-Forwarded-For HTTP header, and we configure which servers we trust this forwarded information from. However, for this specific case, we need to read this information from the True-Client-IP header.