Closed bazalt closed 1 week ago
http-request deny deny_status 403 hdr Cache-Control no-cache hdr Connection close content-type text/html lf-file /etc/haproxy/errors/403.http if { var(txn.coraza.action) -m str deny }
http-response deny deny_status 403 hdr Cache-Control no-cache hdr Connection close content-type text/html lf-file /etc/haproxy/errors/403.http if { var(txn.coraza.action) -m str deny }
use this as an example
Thanks for the tip 👍️
Hi,
My goal is to display a custom 403 page when Coraza WAF blocks requests in a HAProxy context:
I tried multiple things, including this conf (see lines 19-20 containing
http-request deny deny_status 403 errorfiles waf-errors
):These
http-request deny deny_status 403 errorfiles waf-errors hdr waf-block [...]
directives raise warnings when reloading HAProxy, but seems to work anyway... 🤷⁉️ (the erorrfile typo in the warning message is not my own):Do you have any advice to achieve this in a cleaner way?
Thank you