ssl - Electron 中的 net::ERR_INSECURE_RESPONSE

标签 ssl windows-10 ssl-certificate electron

我正在尝试通过 https 连接到本地主机。由于在生产中它将被替换为具有有效 SSL 的正确 IP,但在本地主机上它会在 Electron 上抛出错误。

enter image description here

如何通过抑制 SSL 检查来避免错误,仅在用于测试的本地主机上,我将在生产中删除它。请帮忙

最佳答案

Chris给出了准确的解释。只需发布相同的代码

win = new BrowserWindow({
        width: 900,
        height: 680,
        webPreferences: {
            webSecurity: false
        }
});
//second alternative
app.commandLine.appendSwitch('ignore-certificate-errors');

关于ssl - Electron 中的 net::ERR_INSECURE_RESPONSE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48058838/

相关文章:

fonts - 如何以编程方式添加 Windows 10 可选字体?

ssl - 在 tomcat 8 中启用 SSL

Java HttpsURLConnection 在没有 setSSLSocketFactory 设置的情况下成功执行

PHP - 无法连接到 FTP - 隐式 SSL 端口 990

jquery - Firefox SSL 和 JQuery 用户界面

android - 接受自签名证书安全吗?

python - 如何为 python 2.7 安装 openssl 1.1.1?

c++ - 如何让 Windows 10 Game Bar 出现在游戏中?

php - 下载失败。 curl 错误 60 : SSL certificate problem: certificate has expired

python - 使用 pip 安装时禁用 ssl 证书验证