Rewrite (append) SAS token to url in azure cdn

637 Views Asked by At

I have been trying to get azure cdn using verizon p1 to append sas token to any url that acesses my blob which is hosting a static website.

The original URL was like https://myproject.blob.core.windows.net/mzz-stage/index.html

The CDN url would be https://mzz-stage.azureedge.net/

I plan to provide the url to the end user as https://mzz-stage.azureedge.net/mzz-stage/index.html

My URL Rewrite rule looks like this

enter image description here

I am getting an error as such :

enter image description here

I feel that this has to do with an incorrect rewrite rule, the rule is supposed to append the url with a sas token to any url that contains mzz-stage in the uri.

PS: The containers and blobs are set to private.

1

There are 1 best solutions below

1
On

Hope you have provided the rules accordingly,

Source: /<Origin>/<ContainerPath>/(.*)

Destination: /<Origin>/<ContainerPath>/$1<SAS>&<Source>

Also note that it can take up to 4 hrs for the new rule to get propagated.