Loading https://github.com works fine for exmaple.
But loading an insecure https, the page displays empty.
I've done some research and tried the 3 flags (webSecurity
, allowDisplayingInsecureContent
, allowRunningInsecureContent
) below with no success.
Looking for any known solutions. Thank you.
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')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With