Hello Marius Shekow
I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this!
Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others", I'll repost your solution.
Issue: Azure App Gateway WAF_v2 Custom Rule evaluation of RequestUri fails to limit allowed paths
Solution:
- In the URL Path map, create a fallback path rule (placed last) for
/*
and make sure to assign a valid (non-empty) backend pool, e.g., use the same one that I also use for/a/*
- Create a WAF policy and associate it with that just-created fallback path rule, and configure a Custom Rule that matches the RequestUri via Regex
.*
, denying all traffic.
Please click "Accept" the answer as original posters help the community find answers faster by identifying the correct answer.