我遇到了和你一样的问题,请问解决了吗
开发者工具控制台,提示这个信息,导致js不执行,没找到解决方法,求解?[图片] Content Security Policy of your site blocks the use of 'eval' in JavaScript 直接导致js代码不执行,经过测试后(新建的全新项目),这个信息是开发者工具自己报的,与代码无关。
2021-09-06楼主这个问题解决了吗?遇到了同样的问题
开发工具遇到提示信息,怎么修复或者屏蔽掉?[图片] Content Security Policy of your site blocks the use of 'eval' in JavaScriptThe 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], ...)[代码] and [代码]setInterval([string], ...)[代码] for evaluating strings.If you absolutely must: you can enable string evaluation by adding [代码]unsafe-eval[代码] as an allowed source in a [代码]script-src[代码] directive.⚠️ Allowing string evaluation comes at the risk of inline script injection.如图所示
2021-09-06