0
0

Electron Security Warning (Insecure Content-Security-Policy)

2024-10-04
2024-10-11
文章摘要
|

警告信息

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'

支持与分享

如果这篇文章对你有帮助,欢迎分享给更多人或者给予支持!