An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: Improve auth failed tip for browser access on non `127.0.0.1` https://github.com/siyuan-note/siyuan/issues/9224
Daniel752f28d699e2
diff --git a/kernel/model/session.go b/kernel/model/session.goindex 04dbd9cccf..87bcae012b 100644--- a/kernel/model/session.go+++ b/kernel/model/session.go@@ -165,7 +165,7 @@ func CheckAuth(c *gin.Context) {u, parseErr := url.Parse(origin)if nil != parseErr {logging.LogWarnf("parse origin [%s] failed: %s", origin, parseErr)- c.JSON(401, map[string]interface{}{"code": -1, "msg": "Auth failed"})+ c.JSON(401, map[string]interface{}{"code": -1, "msg": "Auth failed: parse req header [Origin] failed"})c.Abort()return@@ -177,7 +177,7 @@ func CheckAuth(c *gin.Context) {}if !strings.HasPrefix(u.Host, util.LocalHost) && !strings.HasPrefix(u.Host, "[::1]") {- c.JSON(401, map[string]interface{}{"code": -1, "msg": "Auth failed"})+ c.JSON(401, map[string]interface{}{"code": -1, "msg": "Auth failed: for security reasons, please set [Access authorization code] when using non-127.0.0.1 access\n\n为安全起见,使用非 127.0.0.1 访问时请设置 [访问授权码]"})c.Abort()return}