Reputation: 5021
I use Static website feature of Azure storage account to host React.js application. There is also a CDN endpoint enable for the site (Microsoft Standard CDN pricing tier), so the site URL looks like https://xxx.azureedge.net/. The problem: when I try to access the site via HTTP protocol, it says:
The account being accessed does not support http.
HttpStatusCode: 400
ErrorCode: AccountRequiresHttps
RequestId : 46959fc9-a01e-006d-2bc5-6b781e000000
TimeStamp : 2020-08-06T07:48:01.6590412Z
I would like the user to be redirected to HTTPS version.
Upvotes: 5
Views: 8232
Reputation: 2658
You can allow HTTP without CDN: Under "Settings"->"Configuration" set "Secure tranfer required" to "Disabled".
However, for redirecting to HTTPS you need for example CDN.
Upvotes: 13
Reputation: 5021
The solution was found in Microsoft documentation https://learn.microsoft.com/en-us/azure/cdn/cdn-standard-rules-engine#redirect-users-to-https It says that the redirection from HTTP to HTTPS can be configured in the Rules engine of CDN endpoint. It makes sense to keep in mind that:
Upvotes: 8