Add Cache-Control and Expires headers to Azure Storage Blobs

前端 未结 8 1726
刺人心
刺人心 2020-12-04 21:48

I\'m using Azure Storage to serve up static file blobs but I\'d like to add a Cache-Control and Expires header to the files/blobs when served up to reduce bandwidth costs.

8条回答
  •  佛祖请我去吃肉
    2020-12-04 22:16

    The latest version of Cerebrata Cloud Storage Studio, v2011.04.23.00, supports setting cache-control on individual blob objects. Right click on the blob object, choose "View/Edit Blob Properties" then set the value for the Cache-Control attribute. (e.g. public, max-age=2592000).

    If you check the HTTP headers of the blob object using curl, you'll see the cache-control header returned with the value you set.

提交回复
热议问题