2

I've created an Azure Storage account and can upload and download files using a connection string like below in C#:

DefaultEndpointsProtocol=https;AccountName=XXX;AccountKey=YYY;EndpointSuffix=core.windows.net

I've added CDN to this account, and I have the endpoint hostname:

https://zzz.azureedge.net

How can I modify the connection string so that content is downloaded using the CDN instead of, I guess, directly from the storage account based where-ever I set it up (in my case, the UK)?

GoldieLocks
  • 845
  • 7
  • 22

2 Answers2

1

I think you need to use a different string for that in a format:

http://<EndpointName>.azureedge.net/<myPublicContainer>/<BlobName>

(see this for details).

Reason for that is that non-read operations must go to your central location and then they get propagated to CDNs according to refresh policy.

Migol
  • 8,161
  • 8
  • 47
  • 69
0

You can add a custom url for the various types of storage endpoints. For example:

DefaultEndpointsProtocol=https;AccountName=XXX;AccountKey=YYY;BlobEndpoint=https://zzz.azureedge.net

You can use this to use a custom domain as well.

More information here.