CrumpledDog / Umbraco-AzureCDNToolkit

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

AzureCDNToolkit not using CDN URL but redirects to Azure blob storage URL #21

Closed samirjusic closed 5 years ago

samirjusic commented 5 years ago

I'm using Azure CDN Toolkit (v0.1.12-beta) with Umbraco 7.13.1. My images are getting resized and stored into cache Azure blob.

However, the generated page never seems to redirect to the CDN URL, it always redirects to the root Azure storage URL (https://blah-blah.blob.core.windows.net/cache/e/9/1/e/1/1/some-image-name.png)

These URLs are generated in razor templates using:

@Url.GetCropCdnUrl(img, width:768, height:470)

In imageprocessor/cache.config I have

<setting key="CachedCDNRoot" value="https://my-cdn-url.azureedge.net/" />

in web.config I have

<add key="AzureCDNToolkit:Domain" value="https://my-domain.com" />
<add key="AzureCDNToolkit:CdnUrl" value="https://my-cdn-url.azureedge.net" />

Any ideas why CDN URL is not used?

Jeavon commented 5 years ago

Have seen this recently where WebApp was set to TLS1.2 so the server is unable to make a connection to the CDN, either set the WebApp to 1.0 or use https://our.umbraco.com/packages/developer-tools/codesharetls12umbraco/ or set TLS to 1.2 yourself in a start up event

samirjusic commented 5 years ago

Thanks Jeavon. That was it. I added some more info on what I did exactly to get the last config pieces in place (please see https://our.umbraco.com/forum/using-umbraco-and-getting-started/97492-azurecdntoolkit-not-using-cdn-url-but-redirects-to-azure-blob-storage-url for those that are interested)