Remove extra annotation when Enabling ModSecurity
Since version 0.25, if you try to use both annotations of: nginx.ingress.kubernetes.io/modsecurity-snippet: | Include /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf Include /etc/nginx/modsecurity/modsecurity.conf and nginx.ingress.kubernetes.io/enable-modsecurity: "true" it breaks nginx config and you will not catch it unless you have nginx admission controller enabled. You do not need the annotation of `Include /etc/nginx/modsecurity/modsecurity.conf` from version 0.25
This commit is contained in:
parent
de12fc16f0
commit
010ec6f159
1 changed files with 7 additions and 0 deletions
|
@ -782,11 +782,18 @@ Note: If you use both `enable-owasp-core-rules` and `modsecurity-snippet` annota
|
|||
`modsecurity-snippet` will take effect. If you wish to include the [OWASP Core Rule Set](https://www.modsecurity.org/CRS/Documentation/) or
|
||||
[recommended configuration](https://github.com/SpiderLabs/ModSecurity/blob/v3/master/modsecurity.conf-recommended) simply use the include
|
||||
statement:
|
||||
|
||||
nginx 0.24.1 and below
|
||||
```yaml
|
||||
nginx.ingress.kubernetes.io/modsecurity-snippet: |
|
||||
Include /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf
|
||||
Include /etc/nginx/modsecurity/modsecurity.conf
|
||||
```
|
||||
nginx 0.25.0 and above
|
||||
```yaml
|
||||
nginx.ingress.kubernetes.io/modsecurity-snippet: |
|
||||
Include /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf
|
||||
```
|
||||
|
||||
### InfluxDB
|
||||
|
||||
|
|
Loading…
Reference in a new issue