Custom errors should be optional

This commit is contained in:
Manuel de Brito Fontes 2016-05-04 21:59:22 -03:00
parent e93d8d8152
commit 5faa855e66
2 changed files with 51 additions and 24 deletions

View file

@ -124,6 +124,20 @@ type nginxConfiguration struct {
// accessed using HTTPS.
HSTSMaxAge string `structs:"hsts-max-age,omitempty"`
// enables or disable if HTTP codes should be passed to a client or be redirected to nginx for
// processing with the error_page directive
// http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_intercept_errors
// By default this is disabled
InterceptHTTP403 bool `structs:"intercept-error-403,omitempty"`
InterceptHTTP404 bool `structs:"intercept-error-404,omitempty"`
InterceptHTTP405 bool `structs:"intercept-error-405,omitempty"`
InterceptHTTP408 bool `structs:"intercept-error-408,omitempty"`
InterceptHTTP413 bool `structs:"intercept-error-413,omitempty"`
InterceptHTTP501 bool `structs:"intercept-error-502,omitempty"`
InterceptHTTP502 bool `structs:"intercept-error-502,omitempty"`
InterceptHTTP503 bool `structs:"intercept-error-503,omitempty"`
InterceptHTTP504 bool `structs:"intercept-error-504,omitempty"`
// Time during which a keep-alive client connection will stay open on the server side.
// The zero value disables keep-alive client connections
// http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout