Azure CDN - Multiple sites on the same domain

Edgar Dockus 6 Reputation points

I have two origins in two origin groups.

origin1 in group1
origin2 in group2

Both origins are storage static websites. The origins point to two different storage accounts hosting two different static websites, origin1 is the default origin. I then have 3 rules within the Rules engine:

Rule does a URL redirect HTTP to HTTPS


And two more rules that do an origin group override depending on the URL path access:


going to loads the site on origin1, going to loads the site on origin1, all good.

Going to tries to load the site on origin2 and it fails. It fails because the site itself tries to look for css and js files in a folder called static, in other words the site tries to load instead of Origin1 site loads fine because it's the default origin, but Origin2 is not the default hence the files are not there. Is there any way around this?

Azure Content Delivery Network
{count} votes

1 answer

Sort by: Most helpful
  1. Edgar Dockus 6 Reputation points


    We've made a source code change on the React app to change how it references js/css files. Instead of going for /static/css/file.css it is now looking for /origin1/static/css/file.css.

    1 person found this answer helpful.
    0 comments No comments