字体文件放入CDN服务器中,跨域问题(IIS版)

Font from origin 'http:/XXXX' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://XXXX' is therefore not allowed access.

 

1:打开访问的资源iis,在HTTP 响应表头中添加代码名称:Access-Control-Allow-Origin值:*

2:重启IIS 正常。

注意添加后此目录可能绕过同源策略引发安全漏洞。

posted @ 2016-03-31 14:36  Shikyoh  阅读(1436)  评论(1编辑  收藏  举报