Closed kamil-michalak closed 4 years ago
How to use this options?
mine nginx config, that's work.
` http{ ...... geoip2_proxy 172.0.0.0/8; geoip2_proxy 10.0.0.0/8; geoip2_proxy 198.162.0.0/16; geoip2_proxy_recursive on;
geoip2 /data/GeoLite2-Country.mmdb {
auto_reload 120m;
$metadata_country_build metadata build_epoch;
$geoip2_country_code default=CN source=$remote_addr country iso_code;
$geoip2_country_name default="China" source=$remote_addr country names en;
}
server {
listen 80;
location /geoip {
default_type text/plain;
return 200 '{"client_ip":"$remote_addr",
"country_name":"$geoip2_country_name","country_code":"$geoip2_country_code"}'; } } } `
Hi, you don't mention about configurations options:
One thing this option will not work if we use source param