Skip to content

Commit

Permalink
Merge pull request #5586 from adiov/geoip2-anon-support
Browse files Browse the repository at this point in the history
Add MaxMind GeoIP2 Anonymous IP support
  • Loading branch information
k8s-ci-robot authored May 21, 2020
2 parents ad0b923 + d03266d commit 7169f3b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions rootfs/etc/nginx/template/nginx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 7169f3b

Please sign in to comment.