当前位置:   article > 正文

electron 控制台 警告_electron security warning (insecure content-securi

electron security warning (insecure content-security-policy) this renderer p

security-warnings.ts:165 Electron Security Warning (Disabled webSecurity) This renderer process has "webSecurity" disabled. This
  exposes users of this app to severe 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.
warnAboutDisabledWebSecurity @ security-warnings.ts:165
logSecurityWarnings @ security-warnings.ts:292
loadHandler @ security-warnings.ts:314
security-warnings.ts:200 Electron Security Warning (allowRunningInsecureContent) This renderer process has "allowRunningInsecureContent"
  enabled. This exposes users of this app to severe 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.
warnAboutInsecureContentAllowed @ security-warnings.ts:200
logSecurityWarnings @ security-warnings.ts:294
loadHandler @ security-warnings.ts:314
security-warnings.ts:182 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.

 需要在 main.js 文件中 加如下代码

process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/427352
推荐阅读
相关标签
  

闽ICP备14008679号