Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hosting fonts on azure cdn - CORS support

I cannot get azure blob storage hosted fonts exposed via azure cdn working in IE or Firefox.

I believe this is because of @font-face cross-domain issues (CORS) and the normal solution is to add an Access-Control-Allow-Origin header. I know that most CDNs now support this but am assuming that Azure still doesn't. Can anyone confirm this?

If this is the case, are there any workarounds?

like image 711
Paul Hiles Avatar asked Oct 15 '12 18:10

Paul Hiles


People also ask

Why do fonts need Cors?

This is because web fonts are subject to Cross-Origin Resource Sharing (CORS). CORS is a way for a remote host to control access to certain types of resources. To resolve this issue you need to ensure that your server is sending the correct Access-Control-Allow-Origin header when font files are requested.

What type of file is Cors rule in Azure storage?

The Cors rule in azure storage is a JSON file.

Can CDN work with Azure storage?

In this quickstart, you enable Azure Content Delivery Network (CDN) to cache content from Azure Storage. Azure CDN offers developers a global solution for delivering high-bandwidth content.


1 Answers

This is no longer true, azure supports CORS

http://blogs.msdn.com/b/windowsazurestorage/archive/2013/11/27/windows-azure-storage-release-introducing-cors-json-minute-metrics-and-more.aspx

and a little guide to adding fonts to your azure cdn:

http://www.devtrends.co.uk/blog/hosting-web-fonts-in-azure-blob-storage-using-the-new-cors-support

like image 157
artfulhacker Avatar answered Oct 27 '22 08:10

artfulhacker