-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
The redirect action in coreruleset is not supported in coraza WAF #144
Comments
Check https://github.com/jptosso/coraza-waf/tree/v2/master/actions, no |
Hey! Thank you both. So this is a major discussion, modsecurity 2 is embedded to apache and that's why it can enforce redirection, for libmodsecurity3 the interruption object contains the redirection instructions. I don't want to overwhelm developers with such implementation complexity, that's why I haven't implemented the action until I get an idea on how to make it easier. Feel free to share your ideas on how it would be easier for you to interact with redirect. The most natural thing would be to ser interruption action to redirect and interruption data to the URL. |
This is an example of the implementation, assuming the action generates the following interruption: // redirect:https://some-url.com/
types.Interruption{
Action: "redirect",
Data: "https://some-url.com/"
} We can handle the redirection like this: switch tx.Interruption {
case "deny":
showError(tx.Interruption.Status)
case "redirect":
redirectUser(tx.Interruption.Data)
} In the following versions interruption.Action will become an enum. Probably. |
Example: SecRule REQUEST_URI "/redirect" \ "phase:1,id:1,status:302,redirect:https://www.example.com"
The redirect action was just merged in coraza v3 and should be included in the upcoming release.
|
Hi,
I did some tests on the settings in the coreruleset/crs-setup.conf.example file and included this file in the Coraza-Server config.yml file, and found that the coreruleset redirect action is not support in coraza WAF. Please have a took and give me some advice.
The text was updated successfully, but these errors were encountered: