owasp-modsecurity / ModSecurity-nginx

ModSecurity v3 Nginx Connector
Apache License 2.0
1.48k stars 274 forks source link

Audtilog not works with nginx default-backend #314

Open Norsu296 opened 7 months ago

Norsu296 commented 7 months ago

Hello, I'm using ingress-nginx on kubernetes and I have enabled Modsecurity via configmap option. Modsecurity works, auditlog is formatted in JSON. When I set in nginx configmap custom-http-errors auditlog is not sent as JSON but as normal nginx output as described in this link. https://github.com/kubernetes/ingress-nginx/issues/5679#issuecomment-1688247728 How can I fix it? I want to have custom error pages and I want to keep auditlog. I tried everything from issue above and related another issues I think it maybe related with https://github.com/SpiderLabs/ModSecurity-nginx/pull/255 but as I can see it was fixed but it still doesn't work. Im using ingress-nginx chart 4.7.1