Reputation: 7057
It appears that I can have multiple end-points in Azure CDN, but each end-point is given its own azure domain.
What I'd like to do is be able to have multiple end-points under one single custom domain; and determine which end-point it goes to based on the route.
e.g. Everything that starts with /api goes to one end-point and everything that starts with anything else goes to another end-point.
Basically, I'm looking for the same functionality that AWS CloudFront allows.
Is this possible?
By the "same custom domain", I mean "www.mydomain.com" for both. I do NOT mean "abc.mydomain.com" and "def.mydomain.com".
Upvotes: 2
Views: 1369
Reputation: 501
You can achieve this today using Premium Azure CDN from Verizon and the Rules Engine 'URL Rewrite' feature.
After you have your endpoints setup, CNAME your custom domain to one of the endpoints and validate it via the azure portal.
Then, create a rules engine rule to redirect to another endpoint in the same profile based on your /api path condition. For more info: https://learn.microsoft.com/en-us/azure/cdn/cdn-rules-engine
For example:
If: Always
'URL Rewrite': Source = "/CDNBASE/Endpoint1/" "(/api*)", Destination = "/CDNBASE/Endpoint2/" "$1",
Upvotes: 1