Add override for proxy_intercept_errors when using Custom HTTP Errors (#9497)
* added proxy-intercept-errors config option * fixed error when comparing locations * fixed missing location config from annotation added e2e test * reversed logic for proxy-intercept-errors to disable-proxy-intercept-errors * reversed logic to disable-proxy-intercept-errors * reversed logic * default has to be false * put comment in same line as return * run gofmt * fixing wrong Boilerplate header * updated code to new IngressAnnotation interface * fixes to satisfy PR comments * synced with upstream; fixed typo * gofumpt disableproxyintercepterrors.go * gofumpt
This commit is contained in:
parent
e0446d7554
commit
ad406b64d8
12 changed files with 395 additions and 108 deletions
|
|
@ -345,6 +345,11 @@ type Location struct {
|
|||
// CustomHTTPErrors specifies the error codes that should be intercepted.
|
||||
// +optional
|
||||
CustomHTTPErrors []int `json:"custom-http-errors"`
|
||||
// ProxyInterceptErrors disables error intecepting when using CustomHTTPErrors
|
||||
// e.g. custom 404 and 503 when service-a does not exist or is not available
|
||||
// but service-a can return 404 and 503 error codes without intercept
|
||||
// +optional
|
||||
DisableProxyInterceptErrors bool `json:"disable-proxy-intercept-errors"`
|
||||
// ModSecurity allows to enable and configure modsecurity
|
||||
// +optional
|
||||
ModSecurity modsecurity.Config `json:"modsecurity"`
|
||||
|
|
|
|||
|
|
@ -466,6 +466,10 @@ func (l1 *Location) Equal(l2 *Location) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
if l1.DisableProxyInterceptErrors != l2.DisableProxyInterceptErrors {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue