Add documentation
This commit is contained in:
parent
bf60d93c30
commit
4bc46c022a
3 changed files with 9 additions and 4 deletions
|
@ -127,6 +127,7 @@ The following table shows a configuration option's name, type, and the default v
|
||||||
|[limit‑rate‑after](#limit-rate-after)|int|0|
|
|[limit‑rate‑after](#limit-rate-after)|int|0|
|
||||||
|[http‑redirect‑code](#http-redirect-code)|int|308|
|
|[http‑redirect‑code](#http-redirect-code)|int|308|
|
||||||
|[proxy‑buffering](#proxy-buffering)|string|"off"|
|
|[proxy‑buffering](#proxy-buffering)|string|"off"|
|
||||||
|
|[limit‑request‑status‑code](#limit-request-status-code)|int|503|
|
||||||
|
|
||||||
## add-headers
|
## add-headers
|
||||||
|
|
||||||
|
@ -702,4 +703,8 @@ Why the default code is 308?
|
||||||
|
|
||||||
## proxy-buffering
|
## proxy-buffering
|
||||||
|
|
||||||
Enables or disables [buffering of responses from the proxied server](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering).
|
Enables or disables [buffering of responses from the proxied server](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering).
|
||||||
|
|
||||||
|
## limit-request-status-code
|
||||||
|
|
||||||
|
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
|
|
@ -471,7 +471,7 @@ type Configuration struct {
|
||||||
// LargeClientHeaderBuffers Sets the status code to return in response to rejected requests.
|
// 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
|
// http://nginx.org/en/docs/http/ngx_http_limit_req_module.html#limit_req_status
|
||||||
// Default: 503
|
// Default: 503
|
||||||
LimitReqStatus string `json:"limit-req-status"`
|
LimitReqStatusCode int `json:"limit-req-status-code"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewDefault returns the default nginx configuration
|
// NewDefault returns the default nginx configuration
|
||||||
|
@ -565,7 +565,7 @@ func NewDefault() Configuration {
|
||||||
JaegerServiceName: "nginx",
|
JaegerServiceName: "nginx",
|
||||||
JaegerSamplerType: "const",
|
JaegerSamplerType: "const",
|
||||||
JaegerSamplerParam: "1",
|
JaegerSamplerParam: "1",
|
||||||
LimitReqStatus: "503",
|
LimitReqStatusCode: 503,
|
||||||
}
|
}
|
||||||
|
|
||||||
if glog.V(5) {
|
if glog.V(5) {
|
||||||
|
|
|
@ -102,7 +102,7 @@ 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 }};
|
limit_req_status {{ $cfg.LimitReqStatusCode }};
|
||||||
|
|
||||||
{{ if $cfg.EnableOpentracing }}
|
{{ if $cfg.EnableOpentracing }}
|
||||||
opentracing on;
|
opentracing on;
|
||||||
|
|
Loading…
Reference in a new issue