There are a few settings which needs to be checked while configuring Azure CDN. The one which usually gets overlooked is the HTTP to HTTPS redirect. While we deploy the CDN to be accessed via HTTPS, it does not automatically work when the HTTP protocol is used to access. When this happens, it usually displays the following message with the error “The account being accessed does not support http.”
This can be achieved using the Endpoint Rules engine to redirect the requests from HTTP to HTTPS.
How it is done on Azure Portal
Please note that I have only checked this with Standard Microsoft Tier.
- Go to CDN profile and click on the Endpoint.
- Click on Rules engine under the Settings menu.
- Add a rule as follows.
- Click Save to save the newly created rule.
It usually takes a few minutes for the rules to propagate to all the Endpoints.