Adding some geoip variables and default values (#8159)
* adding geoIp variables that Shopify uses * adding source remote_addr for geoip2-isp
This commit is contained in:
parent
be65620b31
commit
c1be3499eb
1 changed files with 8 additions and 4 deletions
|
@ -245,8 +245,9 @@ http {
|
||||||
|
|
||||||
{{ if eq $file "GeoIP2-ISP.mmdb" }}
|
{{ if eq $file "GeoIP2-ISP.mmdb" }}
|
||||||
geoip2 /etc/nginx/geoip/GeoIP2-ISP.mmdb {
|
geoip2 /etc/nginx/geoip/GeoIP2-ISP.mmdb {
|
||||||
$geoip2_isp isp;
|
$geoip2_isp source=$remote_addr isp;
|
||||||
$geoip2_isp_org organization;
|
$geoip2_isp_org source=$remote_addr organization;
|
||||||
|
$geoip2_asn source=$remote_addr default=0 autonomous_system_number;
|
||||||
}
|
}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
@ -259,8 +260,11 @@ http {
|
||||||
{{ if eq $file "GeoIP2-Anonymous-IP.mmdb" }}
|
{{ if eq $file "GeoIP2-Anonymous-IP.mmdb" }}
|
||||||
geoip2 /etc/nginx/geoip/GeoIP2-Anonymous-IP.mmdb {
|
geoip2 /etc/nginx/geoip/GeoIP2-Anonymous-IP.mmdb {
|
||||||
$geoip2_is_anon source=$remote_addr is_anonymous;
|
$geoip2_is_anon source=$remote_addr is_anonymous;
|
||||||
$geoip2_is_hosting_provider source=$remote_addr is_hosting_provider;
|
$geoip2_is_anonymous source=$remote_addr default=0 is_anonymous;
|
||||||
$geoip2_is_public_proxy source=$remote_addr is_public_proxy;
|
$geoip2_is_anonymous_vpn source=$remote_addr default=0 is_anonymous_vpn;
|
||||||
|
$geoip2_is_hosting_provider source=$remote_addr default=0 is_hosting_provider;
|
||||||
|
$geoip2_is_public_proxy source=$remote_addr default=0 is_public_proxy;
|
||||||
|
$geoip2_is_tor_exit_node source=$remote_addr default=0 is_tor_exit_node;
|
||||||
}
|
}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue