disable modsecurity on error page (#8202)
* disable modsecurity on error page * fix modsecurity error pages test * fix variable in nginx template * disable modsecurity on all internal locations * fix pipeline checks for gofmt Signed-off-by: Florian Michel <florianmichel@hotmail.de>
This commit is contained in:
parent
3230638160
commit
ee50e38b44
2 changed files with 27 additions and 9 deletions
|
|
@ -1277,15 +1277,17 @@ func proxySetHeader(loc interface{}) string {
|
|||
|
||||
// buildCustomErrorDeps is a utility function returning a struct wrapper with
|
||||
// the data required to build the 'CUSTOM_ERRORS' template
|
||||
func buildCustomErrorDeps(upstreamName string, errorCodes []int, enableMetrics bool) interface{} {
|
||||
func buildCustomErrorDeps(upstreamName string, errorCodes []int, enableMetrics bool, modsecurityEnabled bool) interface{} {
|
||||
return struct {
|
||||
UpstreamName string
|
||||
ErrorCodes []int
|
||||
EnableMetrics bool
|
||||
UpstreamName string
|
||||
ErrorCodes []int
|
||||
EnableMetrics bool
|
||||
ModsecurityEnabled bool
|
||||
}{
|
||||
UpstreamName: upstreamName,
|
||||
ErrorCodes: errorCodes,
|
||||
EnableMetrics: enableMetrics,
|
||||
UpstreamName: upstreamName,
|
||||
ErrorCodes: errorCodes,
|
||||
EnableMetrics: enableMetrics,
|
||||
ModsecurityEnabled: modsecurityEnabled,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue