- Content Security Policy of your site blocks the use of 'eval' in JavaScript
- The Content Security Policy (CSP) prevents the evaluation of arbitrary strings as JavaScript to make it more difficult for an attacker to inject unathorized code on your site.
- To solve this issue, avoid using
eval()
,new Function()
,setTimeout([string], ...)
andsetInterval([string], ...)
for evaluating strings. - If you absolutely must: you can enable string evaluation by adding
unsafe-eval
as an allowed source in ascript-src
directive. - ⚠️ Allowing string evaluation comes at the risk of inline script injection.
如图所示
开发者工具的运行时 appservice 中开了 csp
基础库中引用了protobufjs 中有一段关于 eval 的 https://github.com/protobufjs/protobuf.js/issues/997
所以有这个提示。
忽略他即可
新项目什么都没做,为什么也报这个错误
楼主这个问题解决了吗?遇到了同样的问题
这个东西会导致JS运行失败吗? 真是糟糕 也遇到了这个问题 跳转无效
我现在也不跳转
点击 Issues 旁边关闭按钮
提示Content Security Policy of your site blocks the use of 'eval' in JavaScrip 本来网页跳转好好的,出现这个以后,点击跳转网页传不了值,显示的值为空。y of your site blocks the use of 'eval' in JavaScript
提示一模一样,在模拟器不运行,但偶尔运行。提交审核线上发布后,部分功能不能用。官方到底有没有解决办法?
请问各位大佬,这个问题是怎么解决的?求救。