Reputation: 341
I have setup some static content in a CDN but when accessing the .html file, the file gets downloaded and not rendered in the browser.
I am using a blob container
http://cdn-dezelo-consulting01.azureedge.net/index.html
I don't know what I missed ?
Upvotes: 1
Views: 848
Reputation: 136176
I traced the request/response through Fiddler and noticed the Content-Type
property on your blob (index.html
) is set as application/octet-stream
(which is default content type for a blob in Azure). This is the reason it is being downloaded instead of displayed in the browser because the browser doesn't know how to deal with this type of content.
Please change the content type property of the blob to text/html
and the HTML page should load just fine.
As a side note, try accessing the URL in Internet Explorer and it should work (In my experience I have found IE to be a bit smarter than other browsers :). While other browsers rely on content type property, IE seems to infer the file type rather smartly).
Upvotes: 6