Reputation: 775
I have a SPA (built with angular) and deployed to Azure Blob Storage. Everything works fine and well with azure CDN. ones I put azure storage in to the azure sub net inside azure V-net storage, CDN url gives 'The requested content does not exist' but default url (storage url) works fine.
Upvotes: 1
Views: 1078
Reputation: 28214
From your description, It looks like you have allowed access from selected networks in the firewalls and virtual networks
of the storage account. Read here.
Turning on firewall rules for your storage account blocks incoming requests for data by default, unless the requests originate from a service operating within an Azure Virtual Network (VNet) or from allowed public IP addresses. Requests that are blocked include those from other Azure services, from the Azure portal, from logging and metrics services, and so on.
So it will block the Azure CDN request when you access the SPA via CDN endpoint. In this case, if you want to allow the access from your Azure CDN, you could retrieve the current POP IP list for Azure CDN and then whitelist these IP ranges in the firewall of your storage account.
Upvotes: 2