CrumpledDog / Umbraco-AzureCDNToolkit

Makes it easy to fully utilise the Azure CDN with a Umbraco website
13 stars 14 forks source link

Add SAS token for private blobs #17

Closed idseefeld closed 5 years ago

idseefeld commented 5 years ago

@Jeavon After latest comments from James on his ImageProcessor project, I decided the AzureCDNToolkit should be the right place to handle image cache in private blobs. For setup you need some settings:

For testing I have use the latest develop branch of ImageProcessor, because the new ImageProcessor.Web.Plugins.AzureBlobCache.AzureImageService (it handles private media blob container) is still not released.

Btw. Umbraco-AzureCDNToolkit is still in prerelease on NuGet. Any big issue? Maybe I could help?

I think we should build a Azure configuration dashboard. Its quite complex meanwhile - I'll give it a try;-) Greatings Dirk

idseefeld commented 5 years ago

I had an idea for improvement.

idseefeld commented 5 years ago

I have exclude the simple SAS test in release builds for this PR, because it requires a valid Azure connection string or a running AzureStorageEmulator with media container configured. Looks like you can add Azure Blob Storage connections to AppVeyor environment, but I have not tried it. All my manual test have been successful. There is one remark about the CDN configuration. For the SAS query string it is important to use "Bypass caching for query strings" in Caching rules!

idseefeld commented 5 years ago

latest changes in ImageProcessor break this. I have to discuss with James...

idseefeld commented 5 years ago

the latest changes will work only with an open ImageProcessor PR. Meanwhile I am sure this the right package to deal with private blobs, because CDN does not seem to support sas query strings sufficiently. But the UrlHelper extensions seem to be the right place to handle this. Thus I may adopt this approach...