无法解决此问题,我正在将自定义的 Bootstrap CSS 和字体推送到我的 Azure CDN 中,但在 Chrome 中,我不断收到以下错误信息:“源自 'http://azxxxxxx.vo.msecnd.net' 的字体已被跨域资源共享策略阻止加载:所请求的资源上没有 'Access-Control-Allow-Origin' 标头。因此,来自 'http://localhost.domain:16300' 的源不允许访问。
我修改了我的 Bootstrap CSS。
font-face {
font-family: 'Glyphicons Halflings';
src: url('//azxxxxxx.vo.msecnd.net/fonts/glyphicons-halflings-regular.eot');
src: url('//azxxxxxx.vo.msecnd.net/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('//azxxxxxx.vo.msecnd.net/fonts/glyphicons-halflings-regular.woff') format('woff'), url('//azxxxxxx.vo.msecnd.net/fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('//azxxxxxx.vo.msecnd.net/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
}
我已经阅读了一些stackoverflow的帖子,已将以下内容添加到我的webconfig文件中
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
<staticContent>
<mimeMap fileExtension=".woff" mimeType="application/octet-stream" />
</staticContent>
仍然存在同样的问题,有什么想法吗?