Search code examples
azureazure-blob-storageazure-cdn

Azure CDN geo redirect


I have files in blob storage that I'd like to host. I would like end users to go to a certain path and then receive a response that is specific to their country.

Eg I have files: usa.js uk.js

I'd like users go to xxxx.edgesites.net and then receive their usa.js if they are in US and uk.js if they are in UK.

The geo filtering feature of azure CDN looks like it only allows or blocks access according to geo location.

Is there another way of getting to my end goal? Maybe CDN -> Function -> blob ?


Solution

  • You could actually do this all in Azure CDN in the Verizon Premium profile.

    The Premium profile offers the Rules Engine - Location match condition, which you can use with a URL Rewrite feature to direct to locale specific files.

    See more: https://learn.microsoft.com/en-us/azure/cdn/cdn-rules-engine-reference-match-conditions#Location