Merge pull request #3640 from shaikatz/limit-con-status-code
add limit connection status code
This commit is contained in:
commit
f464f0e138
3 changed files with 12 additions and 0 deletions
|
@ -146,6 +146,7 @@ The following table shows a configuration option's name, type, and the default v
|
|||
|[http-redirect-code](#http-redirect-code)|int|308|
|
||||
|[proxy-buffering](#proxy-buffering)|string|"off"|
|
||||
|[limit-req-status-code](#limit-req-status-code)|int|503|
|
||||
|[limit-conn-status-code](#limit-conn-status-code)|int|503|
|
||||
|[no-tls-redirect-locations](#no-tls-redirect-locations)|string|"/.well-known/acme-challenge"|
|
||||
|[no-auth-locations](#no-auth-locations)|string|"/.well-known/acme-challenge"|
|
||||
|[block-cidrs](#block-cidrs)|[]string|""|
|
||||
|
@ -827,6 +828,10 @@ Enables or disables [buffering of responses from the proxied server](http://ngin
|
|||
|
||||
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
|
||||
|
||||
## limit-conn-status-code
|
||||
|
||||
Sets the [status code to return in response to rejected connections](http://nginx.org/en/docs/http/ngx_http_limit_conn_module.html#limit_conn_status). _**default:**_ 503
|
||||
|
||||
## no-tls-redirect-locations
|
||||
|
||||
A comma-separated list of locations on which http requests will never get redirected to their https counterpart.
|
||||
|
|
|
@ -519,6 +519,11 @@ type Configuration struct {
|
|||
// Default: 503
|
||||
LimitReqStatusCode int `json:"limit-req-status-code"`
|
||||
|
||||
// LimitConnStatusCode Sets the status code to return in response to rejected connections.
|
||||
// http://nginx.org/en/docs/http/ngx_http_limit_conn_module.html#limit_conn_status
|
||||
// Default: 503
|
||||
LimitConnStatusCode int `json:"limit-conn-status-code"`
|
||||
|
||||
// EnableSyslog enables the configuration for remote logging in NGINX
|
||||
EnableSyslog bool `json:"enable-syslog"`
|
||||
// SyslogHost FQDN or IP address where the logs should be sent
|
||||
|
@ -675,6 +680,7 @@ func NewDefault() Configuration {
|
|||
JaegerSamplerType: "const",
|
||||
JaegerSamplerParam: "1",
|
||||
LimitReqStatusCode: 503,
|
||||
LimitConnStatusCode: 503,
|
||||
SyslogPort: 514,
|
||||
NoTLSRedirectLocations: "/.well-known/acme-challenge",
|
||||
NoAuthLocations: "/.well-known/acme-challenge",
|
||||
|
|
|
@ -198,6 +198,7 @@ http {
|
|||
ignore_invalid_headers {{ if $cfg.IgnoreInvalidHeaders }}on{{ else }}off{{ end }};
|
||||
|
||||
limit_req_status {{ $cfg.LimitReqStatusCode }};
|
||||
limit_conn_status {{ $cfg.LimitConnStatusCode }};
|
||||
|
||||
{{ if $cfg.EnableOpentracing }}
|
||||
opentracing on;
|
||||
|
|
Loading…
Reference in a new issue