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: Proxy setting sometimes cancel requests https://github.com/siyuan-note/siyuan/issues/9725
Daniel3c755b1864f5
diff --git a/kernel/api/router.go b/kernel/api/router.goindex 6b8a3ad7d0..d6a2cf2a43 100644--- a/kernel/api/router.go+++ b/kernel/api/router.go@@ -34,7 +34,6 @@ func ServeAPI(ginServer *gin.Engine) {ginServer.Handle("POST", "/api/system/logoutAuth", model.LogoutAuth)ginServer.Handle("GET", "/api/system/getCaptcha", model.GetCaptcha)ginServer.Handle("POST", "/api/system/setUILayout", setUILayout) // 这里不加鉴权 After modifying the access authentication code on the browser side, the other side does not refresh https://github.com/siyuan-note/siyuan/issues/8028- ginServer.Handle("POST", "/api/system/getNetwork", getNetwork) // 启动时获取网络设置,不能加鉴权ginServer.Handle("GET", "/snippets/*filepath", serveSnippets)// 需要鉴权@@ -63,6 +62,7 @@ func ServeAPI(ginServer *gin.Engine) {ginServer.Handle("POST", "/api/system/checkUpdate", model.CheckAuth, checkUpdate)ginServer.Handle("POST", "/api/system/exportLog", model.CheckAuth, exportLog)ginServer.Handle("POST", "/api/system/getChangelog", model.CheckAuth, getChangelog)+ ginServer.Handle("POST", "/api/system/getNetwork", model.CheckAuth, getNetwork)ginServer.Handle("POST", "/api/storage/setLocalStorage", model.CheckAuth, model.CheckReadonly, setLocalStorage)ginServer.Handle("POST", "/api/storage/getLocalStorage", model.CheckAuth, getLocalStorage)diff --git a/kernel/model/session.go b/kernel/model/session.goindex d9298d1049..e14a4452a0 100644--- a/kernel/model/session.go+++ b/kernel/model/session.go@@ -206,6 +206,10 @@ func CheckAuth(c *gin.Context) {c.Next()return}+ if strings.HasPrefix(c.Request.RequestURI, "/api/system/getNetwork") {+ c.Next()+ return+ }}// 通过 Cookie