leev / ngx_http_geoip2_module

Nginx GeoIP2 module
BSD 2-Clause "Simplified" License
960 stars 182 forks source link

Possible to use alternative IP Address header when getting GEO Data? #26

Closed cpats007 closed 8 years ago

cpats007 commented 8 years ago

HI. I was wondering if it was possible to be able to use an IP Address in a different header for the IP detection logic - so we could basically pass something through like my_ip_header and use that to obtain the geo data using your module in NGINX?

Hope that makes sense.

Cheers

leev commented 8 years ago

Hi Craig,

You can use the nginx realip module (http://nginx.org/en/docs/http/ngx_http_realip_module.html) for this.

Cheers, Lee

cpats007 commented 8 years ago

Thanks for the reply Lee

Will this allow me to change the IP to a header field before the module makes it’s GEO lookup?

Just wanted to check really.

Thanks again for the quick reply

On 1 Mar 2016, at 09:59, Lee notifications@github.com wrote:

Hi Craig,

You can use the nginx realip module (http://nginx.org/en/docs/http/ngx_http_realip_module.html http://nginx.org/en/docs/http/ngx_http_realip_module.html) for this.

Cheers, Lee

— Reply to this email directly or view it on GitHub https://github.com/leev/ngx_http_geoip2_module/issues/26#issuecomment-190642120.

leev commented 8 years ago

Correct.