我正在尝试在第三方网站的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上,它将正常工作。