How to let custom header with period to bypass application gateway

August Lim 0 Reputation points
2024-07-03T02:58:14.7866667+00:00

I got a custom header with period which I wanted to let it pass through azure application gateway, is there any configuration I need to setup or modify in order to let the header went through the application gateway. The value for the custom header is dynamic, what should I put for the value?

For eg: custom.header

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

1 answer

Sort by: Most helpful
  1. GitaraniSharma-MSFT 49,401 Reputation points Microsoft Employee
    2024-07-03T10:06:48.2233333+00:00

    Hello @August Lim ,

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

    I understand that you would like to exclude a custom request header from Azure WAF evaluation.

    You can configure a WAF exclusion in Application gateway using the Request Header attribute.

    To do so, you can use the RequestHeaderValues match variable, the operator contains, and the selector (custom.header). This configuration stops evaluation of all values for the header custom.header.

    User's image

    In contrast, if your WAF detects the header's name (custom.header) as an attack, you could configure an exclusion for the header key by using the RequestHeaderKeys request attribute.

    User's image

    Refer: https://learn.microsoft.com/en-us/azure/web-application-firewall/ag/application-gateway-waf-configuration?tabs=portal#request-attributes-by-keys-and-values

    When you configure an exclusion, you need to determine whether you want to exclude the name/key or the value from WAF evaluation.

    NOTE: Request attributes by key and values are only available in CRS 3.2 or newer.

    Refer: https://learn.microsoft.com/en-us/azure/web-application-firewall/ag/application-gateway-waf-configuration?tabs=portal#request-attributes-by-keys-and-values

    The new WAF engine is a high-performance, scalable Microsoft proprietary engine and has significant improvements over the previous WAF engine.

    Refer: https://learn.microsoft.com/en-us/azure/web-application-firewall/ag/waf-engine#next-generation-of-waf-engine

    If you are using the older WAF engine, I would request you to set the default rule set to OWASP 3.2 and add the above-mentioned exclusion list.

    Additional reference for you:

    https://learn.microsoft.com/en-us/answers/questions/1369136/exclude-an-url-in-exclution-list-waf-not-work-for

    Kindly let us know if the above helps or you need further assistance on this issue.


    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments