Hello mani
I understand you're seeing some unexpected behavior with your Azure Application Gateway WAF. When using Azure Application Gateway with WAF in Prevention mode, the behavior depends on your rule set configuration:
Default Behavior - Prevention mode will block requests that match WAF rules by default, regardless of the individual rule's action setting. The "Log" action in rule settings typically refers to logging the event, not overriding the mode's blocking behavior.
Custom Rule Behavior - For custom rules specifically, if you set a custom rule's action to "Log", it will only log the request even in Prevention mode (won't block).
But for managed rule sets (OWASP Core Rule Set), Prevention mode will block regardless of individual rule logging settings
If you need to log without blocking for testing purposes, you should:
- Switch to Detection mode temporarily, or
- Create custom rules with Log action, or
- Use rule exclusions for specific traffic patterns
Please don’t forget to close the thread by clicking "Accept the answer" and "Yes" wherever the information provided helps you, as this can be beneficial to other community members.