hosting fonts on azure cdn - CORS support

后端 未结 4 1481
小蘑菇
小蘑菇 2020-12-17 21:47

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 t

相关标签:
4条回答
  • 2020-12-17 22:12

    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

    0 讨论(0)
  • 2020-12-17 22:21

    Your assessment is correct.

    As a workaround, our company is utilizing Google storage (which supports CORS).

    I would also suggest voting up this issue so the Azure team knows how many people are running into it.

    http://www.mygreatwindowsazureidea.com/forums/34192-windows-azure-feature-voting/suggestions/2850796-support-cross-origin-resource-sharing-cors-via-a

    0 讨论(0)
  • 2020-12-17 22:28

    The CDN doesn't modify the headers from the origin, so it responds with whatever headers blob storage emits. Blob storage does not support CORS headers.

    I'm surprised to learn that @font-face has cross-domain restrictions, but it appears that you're right (for Firefox and IE).

    If you have that option, you could put the fonts on a cloud service (rather than blob storage) behind the CDN and emit the right headers there.

    0 讨论(0)
  • 2020-12-17 22:28

    I can use fonts, without setting up the CORS option anyway. I'm linking my fonts directly to the blob storage, and not a CDN, since this one does not supports the CORS from the blob.

    0 讨论(0)
提交回复
热议问题