-
Notifications
You must be signed in to change notification settings - Fork 388
Question: handling multiple CDN domains? #192
Comments
Hello @mikefowler! That's an interesting use case. I feel like In the meantime, if you know that all of your subdomains should have equal uptime (you don't plan on temporarily rotating them offline or whatnot), then hardcoding one of them would be the recommended approach. |
I have a similar issue, but I propose a different approach: the options could allow for multiple "remap urls", so you can remap multiple files, not just limited by replacing a single prefix. |
don't you have Access-Control-Allow-Origin problem? |
I'm playing with
sw-precache
via the Webpack plugin, and am looking for thoughts about how to handle a CDN with multiple subdomains.Current setup:
This works pretty well, but it doesn't allow us to account for the fact that our static assets are served from one of three CDN subdomains (i.e.
a1.our-cdn.com
,a2.our-cdn.com
, etc). A possible route for this type of setup is that we precache the asset by randomly picking one of the subdomains, and then any subsequent requests for that asset name, regardless of subdomain, serves the cached asset.Looking for any thoughts on this setup and how we might leverage
sw-precache
for it.The text was updated successfully, but these errors were encountered: