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
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue