Windows Azure的CDN和* .woff字体 [英] Windows Azure CDN and *.woff fonts

查看:219
本文介绍了Windows Azure的CDN和* .woff字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用CDN在Azure中我的云服务,但字体(* .woff)不起作用!

I use CDN for my cloud services in Azure, but fonts (*.woff) does not work!

当我使用iis的只是静态的文件,我解决这个问题,像

When i use just iis for static files i solve this problem like

<staticContent>
      <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
</staticContent>

(http://stackoverflow.com/questions/3594823/mime-type-for-woff-fonts)

(http://stackoverflow.com/questions/3594823/mime-type-for-woff-fonts)

但我怎么可以在微软的Azure CDN办呢?

But how i can do it in microsoft azure cdn?

推荐答案

它的跨域所以你还需要添加:

Its cross-domain so you also need to add:

<system.webServer>
 <httpProtocol>
  <customHeaders>
    <add name="Access-Control-Allow-Origin" value="*" />
    <add name="Access-Control-Allow-Methods" value="HEAD,GET,OPTIONS" />
  </customHeaders>
 </httpProtocol>
</system.webServer>

这篇关于Windows Azure的CDN和* .woff字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆