* Fix definition order of modsecurity directives for controller to match PR 5315 * Add a test
This commit is contained in:
parent
a064337621
commit
12a2a6d0e0
2 changed files with 82 additions and 4 deletions
|
|
@ -149,14 +149,16 @@ http {
|
|||
{{ if $all.Cfg.EnableModsecurity }}
|
||||
modsecurity on;
|
||||
|
||||
{{ if (not (empty $all.Cfg.ModsecuritySnippet)) }}
|
||||
modsecurity_rules '
|
||||
{{ $all.Cfg.ModsecuritySnippet }}
|
||||
';
|
||||
{{ end }}
|
||||
|
||||
modsecurity_rules_file /etc/nginx/modsecurity/modsecurity.conf;
|
||||
|
||||
{{ if $all.Cfg.EnableOWASPCoreRules }}
|
||||
modsecurity_rules_file /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf;
|
||||
{{ else if (not (empty $all.Cfg.ModsecuritySnippet)) }}
|
||||
modsecurity_rules '
|
||||
{{ $all.Cfg.ModsecuritySnippet }}
|
||||
';
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue