Allow config to disable geoip (#2202)
For a offline or private cloud environment, geoip is not needed. Implementing https://github.com/kubernetes/ingress-nginx/issues/2179
This commit is contained in:
parent
c90a4e811e
commit
5c02d700cb
4 changed files with 15 additions and 2 deletions
|
|
@ -81,6 +81,7 @@ http {
|
|||
set_real_ip_from {{ $trusted_ip }};
|
||||
{{ end }}
|
||||
|
||||
{{ if $cfg.UseGeoIP }}
|
||||
{{/* databases used to determine the country depending on the client IP address */}}
|
||||
{{/* http://nginx.org/en/docs/http/ngx_http_geoip_module.html */}}
|
||||
{{/* this is require to calculate traffic for individual country using GeoIP in the status page */}}
|
||||
|
|
@ -88,6 +89,7 @@ http {
|
|||
geoip_city /etc/nginx/geoip/GeoLiteCity.dat;
|
||||
geoip_org /etc/nginx/geoip/GeoIPASNum.dat;
|
||||
geoip_proxy_recursive on;
|
||||
{{ end }}
|
||||
|
||||
{{ if $cfg.EnableVtsStatus }}
|
||||
vhost_traffic_status_zone shared:vhost_traffic_status:{{ $cfg.VtsStatusZoneSize }};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue