首页 > 基础资料 博客日记
vue报错Refused to evaluate a string as JavaScript because ‘unsafe-eval’ is not an allowed...
2024-07-12 18:00:06基础资料围观192次
本篇文章分享vue报错Refused to evaluate a string as JavaScript because ‘unsafe-eval’ is not an allowed...,对你有帮助的话记得收藏一下,看Java资料网收获更多编程知识
electron 使用sequelize报错Uncaught 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’”.
解决
Electron中开启了内容安全策略(CSP)
把html中meta标签,增加’unsafe-eval’
<meta http-equiv="Content-Security-Policy" content="script-src 'self' ">
改为
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-eval'">
文章来源:https://blog.csdn.net/qq_41391095/article/details/136714026
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:jacktools123@163.com进行投诉反馈,一经查实,立即删除!
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:jacktools123@163.com进行投诉反馈,一经查实,立即删除!
标签: