leev / ngx_http_geoip2_module

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

[Help]How can I use the first one ip in the xff? #80

Closed myf5 closed 5 years ago

myf5 commented 5 years ago

Hi, With xff as source, assume xff value is: 1.1.1.1,2.2.2.2,3.3.3.3 how can I get the 1.1.1.1 as value? geoip2 geoip/GeoLite2-City.mmdb { $geoip2_data_city_name source=$http_x_forwarded_for city names en; } Many thanks

leev commented 5 years ago

See #44