diff --git a/internal/ingress/controller/config/config.go b/internal/ingress/controller/config/config.go index a82a3b3d8..8808c0f2b 100644 --- a/internal/ingress/controller/config/config.go +++ b/internal/ingress/controller/config/config.go @@ -467,6 +467,11 @@ type Configuration struct { // server to the client response // Default: empty HideHeaders []string `json:"hide-headers"` + + // LargeClientHeaderBuffers Sets the status code to return in response to rejected requests. + // http://nginx.org/en/docs/http/ngx_http_limit_req_module.html#limit_req_status + // Default: 503 + LimitReqStatus string `json:"limit-req-status"` } // NewDefault returns the default nginx configuration @@ -560,6 +565,7 @@ func NewDefault() Configuration { JaegerServiceName: "nginx", JaegerSamplerType: "const", JaegerSamplerParam: "1", + LimitReqStatus: "503", } if glog.V(5) { diff --git a/rootfs/etc/nginx/template/nginx.tmpl b/rootfs/etc/nginx/template/nginx.tmpl index 7c8265d48..4040f5507 100644 --- a/rootfs/etc/nginx/template/nginx.tmpl +++ b/rootfs/etc/nginx/template/nginx.tmpl @@ -102,6 +102,8 @@ http { underscores_in_headers {{ if $cfg.EnableUnderscoresInHeaders }}on{{ else }}off{{ end }}; ignore_invalid_headers {{ if $cfg.IgnoreInvalidHeaders }}on{{ else }}off{{ end }}; + limit_req_status {{ $cfg.LimitReqStatus }}; + {{ if $cfg.EnableOpentracing }} opentracing on; {{ end }}