you all need to change the url on the web site, and deploy the wwwroot to the azure cdn.
you could create a tag helper for links.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I am trying to understand Azure CDN offerings and would like something clarifying about the behaviour of it.
I have an App Service which hosts my ASP.NET website and it serves a bunch of static content such as images, sound files and bundled JavaScript files.
I would like to offload the serving of these files from my app service since they are static by nature.
Can I simply associate a CDN with the App Service in the portal without the need to hardcode new URLs in my application? Or do I need to write into my deployment that relative urls need converting from /scripts/bundle.js to https://mycdnurl.azure.net/scripts/bundle.js
It seems a bit of an upheaval to alter my deployment scripts to upload the static content elsewhere and then change my urls in the deployed site.
Or is Azure able to intercept the request to my static content from a client e.g. www.mysite.com/scripts/bundle.js and serve it from azurecdn.net/scripts/bundle.js
I have done some reading but I am not clear how it really works and if this can all be simply configured from the portal without much additional work.
Thanks in advance for any forthcoming help.
Paul
you all need to change the url on the web site, and deploy the wwwroot to the azure cdn.
you could create a tag helper for links.
Sounds like Clouldflare will be a better option for me then. I don't really want additional deployment steps.
Thanks for the answer though