Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Disable automatic HTTPS upgrade for mixed content in Electron app (#17994)

Jeffrey Chencf684cdf23de
diff --git a/app/electron/main.js b/app/electron/main.js
index a8aa9a7ee6..57e9ab0441 100644
--- a/app/electron/main.js
+++ b/app/electron/main.js
@@ -78,6 +78,8 @@ app.commandLine.appendSwitch("auto-detect", "false");
app.commandLine.appendSwitch("no-proxy-server");
app.commandLine.appendSwitch("enable-features", "PlatformHEVCDecoderSupport");
app.commandLine.appendSwitch("xdg-portal-required-version", "4");
+// 本地 HTTPS 页面加载 HTTP 外链图时,禁止自动升级为 HTTPS
+app.commandLine.appendSwitch("disable-features", "AutoupgradeMixedContent");
// Support set Chromium command line arguments on the desktop https://github.com/siyuan-note/siyuan/issues/9696
writeLog("app is packaged [" + app.isPackaged + "], command line args [" + process.argv.join(", ") + "]");