leev / ngx_http_geoip2_module

Nginx GeoIP2 module
BSD 2-Clause "Simplified" License
983 stars 186 forks source link

http_x_forwarded_for ip not getting picked up. #47

Closed muditdixit7 closed 7 years ago

muditdixit7 commented 7 years ago

Im setting http_x_forwarded_for in my request but ngx_http_geoip2_module module is not picking the forwaded ip and providing me geoip information of ip with which request is sent.

leev commented 7 years ago

44

muditdixit7 commented 7 years ago

My use case is : 1) I want the ip information with which request is sent if http_x_forwarded_for is not set.` 2) I Want the ip information of forwaded ip if http_x_forwarded_for is set.

Any way to achieve this.Currently i am able to achieve only one of the 2 mentioned above by setting source = http_x_forwarded_for

leev commented 7 years ago

Then you want the realip module.