Merge pull request #5586 from adiov/geoip2-anon-support

Add MaxMind GeoIP2 Anonymous IP support
This commit is contained in:
Kubernetes Prow Robot 2020-05-21 12:20:15 -07:00 committed by GitHub
commit 7169f3ba46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -211,11 +211,21 @@ http {
$geoip2_isp_org organization; $geoip2_isp_org organization;
} }
{{ end }} {{ end }}
{{ if eq $file "GeoIP2-Connection-Type.mmdb" }} {{ if eq $file "GeoIP2-Connection-Type.mmdb" }}
geoip2 /etc/nginx/geoip/GeoIP2-Connection-Type.mmdb { geoip2 /etc/nginx/geoip/GeoIP2-Connection-Type.mmdb {
$geoip2_connection_type connection_type; $geoip2_connection_type connection_type;
} }
{{ end }} {{ 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 }}
{{ end }} {{ end }}