我在项目中使用引导图标,这给了我错误
子资源完整性:资源
'http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'
具有完整性属性,但资源要求请求
启用 CORS 来检查完整性,但事实并非如此。资源
已被阻止,因为无法强制执行完整性。
任何人都可以帮助我解决这个问题,当我们转向生产时,图标没有加载。
所以我使用下面的链接作为引导图标
%link{:href => "http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css", :integrity => "sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7", :rel => "stylesheet"}/
我想你失踪了crossorigin="anonymous"
.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
当请求与同源策略不匹配时,跨域
属性必须存在才能检查文件的完整性。
在外部源上设置完整性并且缺少跨源
浏览器将选择“失败打开”,这意味着它将加载
资源就像未设置完整性属性一样。
Source https://www.npmjs.com/package/ember-cli-sri#crossorigin-attribute
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)