Serve vendor-bundle and app-bundle from CDN


I’m using Azure Functions and Function Proxies to avoid CORS. I direct any request other than /api or /scripts to index.html in blob storage. /api/* goes to the functions and /scripts/* is for vendor-bundle and app-bundle from blob storage. This works great, however, I’d like to serve vendor-bundle and app-bundle from a CDN, so from a different domain to index.html. I can replace the vendor-bundle url to the CDN version, but the app-bundle is still served relative to the index.html.

How can I tell Aurelia to load the app-bundle from the CDN too? I’m using CLI.



You could use Cloudflare to wrap the entire site which would effectively give a CDN for all the files.

Just make sure the API routes don’t get cached. You can do this with headers or disable caching for specific paths in the cloudflare config.


Thanks, yeah, I was being dumb :smile: