Utilize RegEx variable to minimize Rules within Azure Front Door Rule Sets
Is there a way to use RegEx in Azure FrontDoor Standard Subscription Rule Set, to extract a value lets say from a Request Header Accept-Language and use the extracted value in thr URL Rewrite Action to do some localization managing. For example: Accept-Language is “ja-JP” i write a regex to extract any supported languages lets say (en|es|fr|ja). Since “ja” is included in the header, I want to use that value in my URL Rewrite path, for example /gallery/letters/{lang}/writtenArticle.svg where {lang} is the value found in the provided regex. This can do so much good since currently every time I want to do some localization paths from lets say the CDN i have to write a seperate rule for each language. If I support 6 languages and I have let’s say 20 images written in those 6 languages, i would need 6 x 20 = 120 rules. Instead of utilizing the variable extraction for the regex and using that, making only 20 rules that contain each supported language within. I hope what i wrote makes sense.
Read more here: Source link
