How to show trace info on custom error pages when WAF blocks a request and returns a 403?

del Risco Martínez, Jorge 20 Reputation points
2024-03-20T15:38:05.0133333+00:00

If a user does something that triggers a 403 because the WAF blocked the request, I would like to show some extra information in the custom error page that I have already set in the Application Gateway, so it will be easy to identify in the Log Analytics Workspace the blocked transaction. Is there a way to connect that transaction information to the custom error page that the user gets?

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

Accepted answer
  1. KapilAnanth-MSFT 35,001 Reputation points Microsoft Employee
    2024-03-21T03:55:41.71+00:00

    @del Risco Martínez, Jorge ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    This feature is available in Azure Front Door.

    See : Configure a custom response for Azure WAF for AFD

    But not in Application Gateway as of now.

    While you can still create a custom error page, you cannot create a custom error response with details from App gateway logs.

    See : Create Application Gateway custom error pages

    Should you be interested in this feature, you may vote in Azure Feedback Hub forum requesting this feature.

    All the feedback shared in these forums are monitored and reviewed by the Microsoft engineering teams responsible for building Azure

    Refer : https://feedback.azure.com/d365community/forum/8ae9bf04-8326-ec11-b6e6-000d3a4f0789

    Hope this helps.

    Cheers,

    Kapil.

    0 comments No comments

0 additional answers

Sort by: Most helpful