Fixed the default config condition in ingress controller template

This commit is contained in:
besha100 2021-12-15 23:00:24 +01:00
parent fed84ef5cf
commit 9d38eca40f

View file

@ -1537,6 +1537,11 @@ func buildModSecurityForLocation(cfg config.Configuration, location *ingress.Loc
`, location.ModSecurity.TransactionID))
}
if !isMSEnabled && location.ModSecurity.Snippet == "" {
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;
`)