Loading https://github.com https://github.com例如,工作正常。
但是加载不安全的https,页面显示为空.
我做了一些研究并尝试了 3 个标志(webSecurity
, allowDisplayingInsecureContent
, allowRunningInsecureContent
)下面没有成功。
寻找任何已知的解决方案。谢谢。
const { BrowserWindow } = require('electron').remote;
let win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
plugins: true,
nodeIntegration: false,
webSecurity: false,
allowDisplayingInsecureContent: true,
allowRunningInsecureContent: true
}
});
win.loadURL('https://insecure...')
In main.js
, do:
const { app } = require('electron')
app.commandLine.appendSwitch('ignore-certificate-errors')
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)