This allows you to override the Request.remoteIp with an IP Address from an HTTP header field
This allows you to override the Request.remoteIp with an IP Address from an HTTP header field
Example:
ClientIPLookupSpec( headerName = "X-Client-IP", requiredHeaderAndValue = Some(("X-Is-From-CDN", "secret value set by the CDN/Proxy")) valueIdx = ClientIPHeaderValueToUse.Last )
In this case if a request comes in with an "X-Client-IP" value but no "X-Is-From-CDN" header value then the "X-Client-IP" will not be used. If the "X-Client-IP" header does exist and is set to whatever we configured then the "X-Client-IP" will be used.
The header name to grab the client ip from (e.g. X-Forwarded-For)
An optional header/value pair that must exist in order to look at the headerName
Which value to use when there are multiple values (e.g. X-Forward-For: 1.2.3.4,4.5.6.7)
This is the original default behavior of using the last value of the "X-Forwarded-For" header