-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix: SecAction can't be disabled via ctl action #26
Conversation
I've thought about this change a little. CRS isn't designed to be enabled on a per location / server basis (mainly due to ModSecurity). I can see the use case though. However, I wonder whether this change is the best way to achieve what you want. If I understand correctly, you would write a rule for each location / server, where you wanted to disable the exclusion rule set, something like
Personally, I would try to solve this with the
@dune73, what do you think? |
You'd just have to write one ModSec rule where if the host header doesn't equal say example.com, then you'd disable the plugin via a ctl action. This is how I personally do it. I'm not too sure about the performance but this shouldn't be combersome to write at all since it's just one rule.
or if you wanted to disable per location
|
You can disable plugin globally and enable it only where it's needed. |
We should write an explanation of using |
SecAction rules can't be disabled via a ctl action or run time rule exclusion
This can be problematic in reverse proxy deployments where you only want to enable the WordPress plugin for your WordPress domain.
This PR fixes that by replacing the SecAction with a SecRule that's functionally the exact same, except now it can be disabled via a ctl action.