简体   繁体   中英

ImageResizer returns private for cache-control header value

Our ImageResizer implementation utilizes Azure Blob Storage and Azure CDN. It works well with the exception of the cache headers. If we're accessing a modified image, such as adding width=100, then the cache-control header is "public" with the expected Expires tag and value. If there is no modification and we use the base URL the cache-control header is set to "private".

This is causing issues with our CDN and site speeds. How do we ensure the base URL also returns cache-control="public" with an expires tag (and also ETag, etc)?

ok, I think I figured this out... or at least it's a workaround. In the AzureReader2 config I added untrustedData="true" . This forces the imageresizer to load the blob content and process it, rather than bypassing the process. Perhaps not the best solution, but it solved the cache-control issue for now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM