拒绝从域创建工作程序,因为它违反了以下内容安全策略

时间:2019-02-26 20:01:51

标签: javascript unity3d content-security-policy unity-webgl

我正在尝试在第三方网站的IFrame中加载Unity WebGL项目。加载时,我收到此错误:

Refused to create a worker from 'blob:https://sub-domain.domain.com/xxxx'
because it violates the following Content Security Policy directive: 
"script-src 'self' https://sub-domain.domain.com https://otherSubDomain.otherDomain.com".
Note that 'worker-src' was not explicitly set, so 'script-src' is used as a fallback.

如果我仅将其本身加载到localhost上,它将正常工作。

0 个答案:

没有答案