An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: 鉴权页关闭窗口失效 https://github.com/siyuan-note/siyuan/issues/5149
Liang Dinged3a6fcb9ab5
diff --git a/app/stage/auth.html b/app/stage/auth.htmlindex 2dc9dd3c91..8d7642d178 100644--- a/app/stage/auth.html+++ b/app/stage/auth.html@@ -154,7 +154,7 @@If you encounter problems, please report it on <a href="https://github.com/siyuan-note/siyuan/issues"target="_blank">GitHub</a></div>- <button class="b3-button b3-button--white" onclick="exitSiYuan()">退出思源 Exit SiYuan</button>+ <button class="b3-button b3-button--white" onclick="exitSiYuan()">退出 Exit</button></div><div style="overflow: hidden;position: absolute;diff --git a/kernel/model/session.go b/kernel/model/session.goindex 82af888907..698675036e 100644--- a/kernel/model/session.go+++ b/kernel/model/session.go@@ -98,11 +98,16 @@ func CheckAuth(c *gin.Context) {return}- // 放过来自本机的资源文件请求- if strings.HasPrefix(c.Request.RemoteAddr, "127.0.0.1") &&- (strings.HasPrefix(c.Request.RequestURI, "/assets/") || strings.HasPrefix(c.Request.RequestURI, "/history/assets/")) {- c.Next()- return+ // 放过来自本机的某些请求+ if strings.HasPrefix(c.Request.RemoteAddr, "127.0.0.1") {+ if strings.HasPrefix(c.Request.RequestURI, "/assets/") || strings.HasPrefix(c.Request.RequestURI, "/history/assets/") {+ c.Next()+ return+ }+ if strings.HasPrefix(c.Request.RequestURI, "/api/system/exit") {+ c.Next()+ return+ }}// 通过 Cookie