提问,有偿

2021-01-11 15:09:40 +08:00
 satoki

(index):1 Refused to load the script 'https://unpkg.com/element-ui/lib/index.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval' http://cdnjs.cloudflare.com ". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

1128 次点击
所在节点    问与答
6 条回复
wunonglin
2021-01-11 15:12:52 +08:00
satoki
2021-01-11 15:17:16 +08:00
@wunonglin 不是呢
wei745359223
2021-01-11 15:20:45 +08:00
header 里追加一下信任 domian
https://developer.mozilla.org/zh-CN/docs/Web/HTTP/CSP
satoki
2021-01-11 15:23:44 +08:00
@wei745359223 <meta http-equiv="content-security-policy-report-only" content="Content-Security-Policy: default-src 'self' *.trusted.com">是加这个嘛,没起作用
wei745359223
2021-01-11 15:28:29 +08:00
@satoki
加你需要信任的域名 unpkg.com
satoki
2021-01-11 15:54:16 +08:00
@wei745359223 老哥方便的话加个 v 吧 MTc2MDE0OTc2NzQ=

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/743850

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX