Using Azure CDN with Shared Access Signatures

一笑奈何 提交于 2019-12-03 03:21:54

You can use SAS URLs with the CDN. All you need to do is provide the correct SAS signature appended to the CDN URL.

It would look like:

Some caveats with this approach:

  • Anybody with this URL can access the file, so you would have to have a mechanism to keep this URL private. This also means that if the URL leaks out then anybody can access the file so you have to determine if this is an acceptable level of security.
  • The CDN will cache the object using the full URL including SAS, so the cached object will be valid for the cache duration which is 7 days by default. This means that you need to make sure you set the cache control headers on the blob to be the same duration as your SAS URL so that the cached CDN object will expire at the same time as the SAS URL.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!