Skip to content

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

使用 HTTPS 协议访问认证页面时无法建立 Web Socket 连接 (#7161)

颖逸3f87f3da5e21
diff --git a/app/stage/auth.html b/app/stage/auth.html
index e3135a82cd..bbb10d5a5f 100644
--- a/app/stage/auth.html
+++ b/app/stage/auth.html
@@ -529,7 +529,7 @@
}
// 用于授权页保持连接,避免非常驻内存内核自动退出 https://github.com/siyuan-note/insider/issues/1099
- new WebSocket(window.location.protocol === 'https:' ? 'wss' : 'ws' + '://' + window.location.host + '/ws?app=siyuan&id=auth')
+ new WebSocket(`${window.location.protocol === 'https:' ? 'wss' : 'ws'}://${window.location.host}/ws?app=siyuan&id=auth`)
</script>
</body>
</html>