How do I configure the Azure Application Gateway / backend pool to drop requests that are blocked by the WAF as the log file indicate the request was blocked but the script ends up in the database.

Derek Green 0 Reputation points
2024-05-16T08:21:12.23+00:00

requests blocked by the WAF are being forwarded to the backend API servers. How do you configure the backend pool or WAF to drop requests that are blocked by the WAF.

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
980 questions
Azure Web Application Firewall
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ChaitanyaNaykodi-MSFT 23,816 Reputation points Microsoft Employee
    2024-05-17T01:09:56.5766667+00:00

    @Derek Green

    Thank you for reaching out.

    I understand you wish to drop the request when they are blocked by the WAF.

    You achieve this by setting the WAF in prevention mode and then modifying the action to Block as shown in the screenshot below.

    User's image

    As documented here

    • Block: The request is blocked and WAF sends a response to the client without forwarding the request to the back-end.

    Hope this helps! Please let me know if the issue still persists. Thank you!