Endpoints when AFD rule set is on always returns 200

Deivydas Voroneckis 0 Reputation points
2024-05-16T06:03:06.01+00:00

I have an endpoint: www.testwebsite.com/wrong-url which returns response status code: 404.

However, when AFD rule is enabled by rule set configuration it always returns 200 which is wrong.

This applies to all endpoints which go through rule set rule and should return 404.

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
688 questions
{count} votes

1 answer

Sort by: Most helpful
  1. GitaraniSharma-MSFT 49,651 Reputation points Microsoft Employee
    2024-05-16T07:17:42.3233333+00:00

    Hello @Deivydas Voroneckis ,

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

    I understand that your Azure Front Door endpoints return 200 when AFD rule set is ON, however they should return 404 as they don't have any routing rule set up for the specific paths.

    Please refer the below document which shows how requests get matched to a route configuration in Azure Front Door?

    https://learn.microsoft.com/en-us/azure/frontdoor/front-door-route-matching?pivots=front-door-standard-premium

    Per the path matching section,

    enter image description here

    Did you confirm that you don't have any routing rule with a wildcard path that could match with the above endpoints?

    Regards,

    Gita

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.