-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass error details to PHP #162
Comments
Good question. What do you expect to see here and what do you expect it to show? Right now we return a static error https://github.com/corazawaf/coraza-caddy/blob/main/coraza.go#L95 |
I would prefer to see what rule(s) was triggered. Something similar to what https://sandbox.coreruleset.org/ returns when it blocks a request. |
Coraza processes the response after PHP has finished. You won't be able to access the variables synchronously. |
I guess I am a magician then, since with my config I am able to get
Which is coming from my PHP code. But again this is not useful, since it's too generic and in some cases difficult to debug to get understanding what exactly blocked the request and why, hence this ticket was raised. |
Is it possible to somehow pass the error details to PHP, when request is interrupted by Coraza? I hoped that
{http.err.message}
would have something, but it seems to show only genericinterruption triggered
. I have custom error pages generated by PHP, and I want to customize them if it's Coraza that interrupts request. I was not able to find anything in documentation or anything obvious in code.The text was updated successfully, but these errors were encountered: