diff options
Diffstat (limited to 'plugins/http/config/http.go')
-rw-r--r-- | plugins/http/config/http.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/http/config/http.go b/plugins/http/config/http.go index a1c2afa6..f06adc49 100644 --- a/plugins/http/config/http.go +++ b/plugins/http/config/http.go @@ -15,6 +15,9 @@ type HTTP struct { // Host and port to handle as http server. Address string + // InternalErrorCode used to override default 500 (InternalServerError) http code + InternalErrorCode uint64 `mapstructure:"internal_error_code"` + // SSLConfig defines https server options. SSLConfig *SSL `mapstructure:"ssl"` @@ -80,6 +83,10 @@ func (c *HTTP) InitDefaults() error { } } + if c.InternalErrorCode == 0 { + c.InternalErrorCode = 500 + } + if c.HTTP2Config == nil { c.HTTP2Config = &HTTP2{} } |