微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

拒绝编译或实例化WebAssembly模块,因为'wasm-eval'是不允许的脚本源

如何解决拒绝编译或实例化WebAssembly模块,因为'wasm-eval'是不允许的脚本源

我尝试在Angular应用的iframe中包含Adobe xD原型,这样做会收到此错误

[Report Only] 
Refused to compile or instantiate WebAssembly 
module because 'wasm-eval' is not an allowed source of script in the following Content Security Policy 
directive: 
"
script-src 
https://static.adobelogin.com/imslib/imslib.min.js 
https://prod.adobeccstatic.com/ 

'self' 'unsafe-eval'

https://bam.nr-data.net/ 
https://api.demandbase.com/ 
https://js-agent.newrelic.com/ 
https://www.gstatic.com/recaptcha/ 
https://c.evidon.com/geo/country.js 
https://assets.adobedtm.com/ 
https://use.typekit.net/ 
https://www.google.com/recaptcha/api.js 
https://*.adobe.com 
https://*.cookielaw.org/ 
https://*.onetrust.com/ 'nonce-a5e5d635-4062-43de-b73a-04a9599d3d1a'
".

到目前为止,我还没有制定内容政策。一旦包含src-link,该错误就会出现:

<iframe 
  src="https://xd.adobe.com/embed/9e081b15-b13d-4217-4cf9-8838d58e1ce9-e839/">
</iframe>

我该如何解决?它与内容安全策略有关吗?

如果您打开此Stackblitz app并使用浏览器开发工具检查预览,也可以检查出错误

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。