Add MaxMind GeoIP2 Anonymous IP support

This commit is contained in:
adiov 2020-05-21 06:50:57 +03:00
parent a53ef2b501
commit d03266d505
No known key found for this signature in database
GPG key ID: 38095B290521FED5

View file

@ -211,11 +211,21 @@ http {
$geoip2_isp_org organization;
}
{{ end }}
{{ if eq $file "GeoIP2-Connection-Type.mmdb" }}
geoip2 /etc/nginx/geoip/GeoIP2-Connection-Type.mmdb {
$geoip2_connection_type connection_type;
}
{{ end }}
{{ if eq $file "GeoIP2-Anonymous-IP.mmdb" }}
geoip2 /etc/nginx/geoip/GeoIP2-Anonymous-IP.mmdb {
$geoip2_is_anon source=$remote_addr is_anonymous;
$geoip2_is_hosting_provider source=$remote_addr is_hosting_provider;
$geoip2_is_public_proxy source=$remote_addr is_public_proxy;
}
{{ end }}
{{ end }}
{{ end }}