Search code examples
azurecdnazure-cdn

How to prevent azure cdn from serving dynamic content?


How do I prevent azure cdn from serving dynamic content? I only want it to serve static files: images, scripts and css but when I choose my web app as origin it serves also the root url (/), that is a dynamic page. Can I create restrictions based on file extension?


Solution

  • Not at this time. Any request to the CDN edge node is going to hit the origin for the asset and cache it, whether it's dynamic or static content. The solution, then, is to ensure that your application doesn't link to any dynamic content via the CDN.