Azure Front Door - Convert all incoming url's to lowercase

135 views Asked by At

I've configured Azure Front Door to route traffic to a Static Web App. I want to create rule/s such that any incoming URL to the Front Door gets transformed to lowercase.

E.g. https://endp-c3sdsfsddd.z03.azurefd.net/Images/Admin/Test.png becomes https://endp-c3sdsfsddd.z03.azurefd.net/images/admin/test.png

I was following this article https://learn.microsoft.com/en-us/answers/questions/99081/front-door-rule-engine-transform-to-lowercase-(bug but this is a very specific case. Wondering whether all incoming URLs can be lowercase.

Thanks.

1

There are 1 answers

0
Jahnavi On

Azure Front Door - Convert all incoming URL's to lowercase: -

For converting all incoming URL's to lowercase, you need to add a rule under rule engine configuration in a front door profile.

To create it, you need to use a combination of Request Header Modification and URL Rewrite actions as shown below.

Path: Front Door and CDN profiles >> Settings >> Rules engine configuration

Add a rule:

enter image description here

Add a request header and select transform action as To Lowercase:

enter image description here

Once you configure actions according to your requirement, save it and you are done with the rule configuration that transforms all redirect URL's to lowercase.

Reference: MSDoc