man*_*mar 2 ssl ssl-certificate windows-10 electron
我正在尝试通过https连接到本地主机。从生产开始,它将被具有有效SSL的正确IP替换,但是在localhost上,它将电子错误。
如何通过抑制SSL检查来避免错误,仅在本地localhost进行测试,我将在生产中删除该检查。请帮助
克里斯给出了确切的解释。只是发布相同的代码
win = new BrowserWindow({
width: 900,
height: 680,
webPreferences: {
webSecurity: false
}
});
//second alternative
app.commandLine.appendSwitch('ignore-certificate-errors');
Run Code Online (Sandbox Code Playgroud)