CrumpledDog / Umbraco-AzureCDNToolkit

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

Dashboard not working #26

Open c9mb opened 4 years ago

c9mb commented 4 years ago

I have the Toolkit installed and I can use the GetCropCdnUrl helper to convert media urls to Azure cached container urls.

I have the domain and azure-account keys configured and GetCropCdnUrl provide direct urls to cached media, while cached media is also returned using 302 redirects everywhere the standard GetCropUrl is still being used.

<add key="AzureCDNToolkit:Domain" value="http://mylocaldomain.com" /> <add key="AzureCDNToolkit:CdnUrl" value="https://myaccountname.blob.core.windows.net" />

However, the dashboard displays an empty server list, and no file lists. image

I know it has to be something dumb - it's what I do best - but for the life of me I can't see what it is.

c9mb commented 4 years ago

Moved.

c9mb commented 4 years ago

Moved.

c9mb commented 4 years ago

So, the issue with the dashboard is that CacheApiController is using: ApplicationContext.Services.ServerRegistrationService.GetActiveServers()

This simply doesn't return a value for my Umbraco-Cloud based projects.

To test it, I added my own UmbracoAuthorizedJsonController resource to fetch: ApplicationContext.Current.Services.ServerRegistrationService.CurrentServerIdentity

and made that the default server, which then let me view the listing of cached image paths for the current server, which is all you have in that config.