Fixed the condition also in ingress controller template
This commit is contained in:
parent
3d1f847871
commit
63152368d7
1 changed files with 3 additions and 5 deletions
|
@ -1530,6 +1530,9 @@ func buildModSecurityForLocation(cfg config.Configuration, location *ingress.Loc
|
|||
%v
|
||||
';
|
||||
`, location.ModSecurity.Snippet))
|
||||
} else {
|
||||
buffer.WriteString(`modsecurity_rules_file /etc/nginx/modsecurity/modsecurity.conf;
|
||||
`)
|
||||
}
|
||||
|
||||
if location.ModSecurity.TransactionID != "" {
|
||||
|
@ -1537,11 +1540,6 @@ func buildModSecurityForLocation(cfg config.Configuration, location *ingress.Loc
|
|||
`, location.ModSecurity.TransactionID))
|
||||
}
|
||||
|
||||
if !isMSEnabled {
|
||||
buffer.WriteString(`modsecurity_rules_file /etc/nginx/modsecurity/modsecurity.conf;
|
||||
`)
|
||||
}
|
||||
|
||||
if !cfg.EnableOWASPCoreRules && location.ModSecurity.OWASPRules {
|
||||
buffer.WriteString(`modsecurity_rules_file /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf;
|
||||
`)
|
||||
|
|
Loading…
Reference in a new issue