Windows Azure CDN and *.woff fonts

大兔子大兔子 提交于 2020-01-15 02:54:26

问题


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

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)

But how i can do it in microsoft azure cdn?


回答1:


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>


来源:https://stackoverflow.com/questions/12091871/windows-azure-cdn-and-woff-fonts

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!