调试发现是src="https://cdn.lordicon.com/*.json"未加载导致。但被try catch了
实际报错: ‘unsafe-eval’ is not an allowedUncaught EvalError: Refused to evaluate a string as JavaScript because ‘unsafe-eval’ is not an allowed source of script in the following Content Security Policy directive: “script-src ‘self’”.
违反了Content Security Policy指令。
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'"/>
临时解决
添加 unsafe-eval
其他 Refused to connect to XXXthat ‘connect-src’ was not explicitly set, so ‘default-src’ is used as
Refused to load the image 'data:image/svg+xml,%3csvg
参考https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)