From 4092043404214e80659bb3eba48c3ed8c705f37e Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sat, 8 Oct 2022 11:05:15 +0800 Subject: [PATCH] =?UTF-8?q?:lock:=20=E5=86=85=E6=A0=B8=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=20`api/system/getConf`=20=E8=84=B1=E6=95=8F=E5=A4=84=E7=90=86?= =?UTF-8?q?=20Fix=20https://github.com/siyuan-note/siyuan/issues/6088?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/session.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/model/session.go b/kernel/model/session.go index a32ceb41c..c66547821 100644 --- a/kernel/model/session.go +++ b/kernel/model/session.go @@ -156,6 +156,11 @@ func CheckReadonly(c *gin.Context) { func CheckAuth(c *gin.Context) { //logging.LogInfof("check auth for [%s]", c.Request.RequestURI) + if "" == Conf.AccessAuthCode { + c.Next() + return + } + // 放过 /appearance/ if strings.HasPrefix(c.Request.RequestURI, "/appearance/") || strings.HasPrefix(c.Request.RequestURI, "/stage/build/export/") ||