Add support for limit_req_status
This commit is contained in:
parent
b020686599
commit
bf60d93c30
2 changed files with 8 additions and 0 deletions
|
@ -467,6 +467,11 @@ type Configuration struct {
|
||||||
// server to the client response
|
// server to the client response
|
||||||
// Default: empty
|
// Default: empty
|
||||||
HideHeaders []string `json:"hide-headers"`
|
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
|
// NewDefault returns the default nginx configuration
|
||||||
|
@ -560,6 +565,7 @@ func NewDefault() Configuration {
|
||||||
JaegerServiceName: "nginx",
|
JaegerServiceName: "nginx",
|
||||||
JaegerSamplerType: "const",
|
JaegerSamplerType: "const",
|
||||||
JaegerSamplerParam: "1",
|
JaegerSamplerParam: "1",
|
||||||
|
LimitReqStatus: "503",
|
||||||
}
|
}
|
||||||
|
|
||||||
if glog.V(5) {
|
if glog.V(5) {
|
||||||
|
|
|
@ -102,6 +102,8 @@ http {
|
||||||
underscores_in_headers {{ if $cfg.EnableUnderscoresInHeaders }}on{{ else }}off{{ end }};
|
underscores_in_headers {{ if $cfg.EnableUnderscoresInHeaders }}on{{ else }}off{{ end }};
|
||||||
ignore_invalid_headers {{ if $cfg.IgnoreInvalidHeaders }}on{{ else }}off{{ end }};
|
ignore_invalid_headers {{ if $cfg.IgnoreInvalidHeaders }}on{{ else }}off{{ end }};
|
||||||
|
|
||||||
|
limit_req_status {{ $cfg.LimitReqStatus }};
|
||||||
|
|
||||||
{{ if $cfg.EnableOpentracing }}
|
{{ if $cfg.EnableOpentracing }}
|
||||||
opentracing on;
|
opentracing on;
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue