Merge pull request #4080 from MRoci/master

Load modsecurity config with OWASP core rules
This commit is contained in:
Kubernetes Prow Robot 2019-05-14 09:59:17 -07:00 committed by GitHub
commit 182b28260c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1104,14 +1104,14 @@ stream {
{{ if (or $location.ModSecurity.Enable $all.Cfg.EnableModsecurity) }} {{ if (or $location.ModSecurity.Enable $all.Cfg.EnableModsecurity) }}
modsecurity on; modsecurity on;
modsecurity_rules_file /etc/nginx/modsecurity/modsecurity.conf;
{{ if $location.ModSecurity.Snippet }} {{ if $location.ModSecurity.Snippet }}
modsecurity_rules ' modsecurity_rules '
{{ $location.ModSecurity.Snippet }} {{ $location.ModSecurity.Snippet }}
'; ';
{{ else if (or $location.ModSecurity.OWASPRules $all.Cfg.EnableOWASPCoreRules) }} {{ else if (or $location.ModSecurity.OWASPRules $all.Cfg.EnableOWASPCoreRules) }}
modsecurity_rules_file /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf; modsecurity_rules_file /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf;
{{ else }}
modsecurity_rules_file /etc/nginx/modsecurity/modsecurity.conf;
{{ end }} {{ end }}
{{ if (not (empty $location.ModSecurity.TransactionID)) }} {{ if (not (empty $location.ModSecurity.TransactionID)) }}