侧边栏壁纸
  • 累计撰写 116 篇文章
  • 累计创建 1 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

Electron Security Warning (Insecure Content-Security-Policy)

Electron Security Warning (Insecure Content-Security-Policy)

警告信息

Electron Security Warning (Insecure Content-Security-Policy) This renderer process has either no Content Security Policy set or a policy with "unsafe-eval" enabled. This exposes users of this app to unnecessary security risks. For more information and help, consult https://electronjs.org/docs/tutorial/security. This warning will not show up once the app is packaged.

解决办法

electron/main.js添加:

process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'
博主关闭了所有页面的评论