From d03266d505338fdeece73608a4e32ab3e2965929 Mon Sep 17 00:00:00 2001 From: adiov Date: Thu, 21 May 2020 06:50:57 +0300 Subject: [PATCH] Add MaxMind GeoIP2 Anonymous IP support --- rootfs/etc/nginx/template/nginx.tmpl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rootfs/etc/nginx/template/nginx.tmpl b/rootfs/etc/nginx/template/nginx.tmpl index 9cf9cd22d..3565f462e 100755 --- a/rootfs/etc/nginx/template/nginx.tmpl +++ b/rootfs/etc/nginx/template/nginx.tmpl @@ -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 }}