Add support for limit_req_status

This commit is contained in:
Anish Ramasekar 2018-01-29 21:41:52 -06:00
parent b020686599
commit bf60d93c30
No known key found for this signature in database
GPG key ID: 649FAC6DAB39EA54
2 changed files with 8 additions and 0 deletions

View file

@ -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) {

View file

@ -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 }}