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'

Logo

赋能鸿蒙PC开发者,共建全场景原生生态,共享一次开发多端部署创新价值。

更多推荐