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:
Oilbeater 2018-03-19 00:30:05 +08:00 committed by Manuel Alejandro de Brito Fontes
parent c90a4e811e
commit 5c02d700cb
4 changed files with 15 additions and 2 deletions

View file

@ -340,6 +340,10 @@ type Configuration struct {
// http://nginx.org/en/docs/http/ngx_http_gzip_module.html
UseGzip bool `json:"use-gzip,omitempty"`
// Enables or disables the use of the nginx geoip module that creates variables with values depending on the client IP
// http://nginx.org/en/docs/http/ngx_http_geoip_module.html
UseGeoIP bool `json:"use-geoip,omitempty"`
// Enables or disables the use of the NGINX Brotli Module for compression
// https://github.com/google/ngx_brotli
EnableBrotli bool `json:"enable-brotli,omitempty"`
@ -542,6 +546,7 @@ func NewDefault() Configuration {
SSLSessionTimeout: sslSessionTimeout,
EnableBrotli: false,
UseGzip: true,
UseGeoIP: true,
WorkerProcesses: strconv.Itoa(runtime.NumCPU()),
WorkerShutdownTimeout: "10s",
LoadBalanceAlgorithm: defaultLoadBalancerAlgorithm,