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