From b03dbfcf27a4e3ae55971843b6f4685b6787b2f1 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 28 Feb 2023 09:20:43 +0800 Subject: [PATCH] =?UTF-8?q?:lock:=20API=20token=20=E7=BB=95=E8=BF=87?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E6=BC=8F=E6=B4=9E=20Fix=20https://github.com?= =?UTF-8?q?/siyuan-note/siyuan/issues/7507?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/session.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/kernel/model/session.go b/kernel/model/session.go index 5e54ddfb2..53ba90f58 100644 --- a/kernel/model/session.go +++ b/kernel/model/session.go @@ -204,7 +204,7 @@ func CheckAuth(c *gin.Context) { } } - if strings.HasSuffix(c.Request.RequestURI, "/check-auth") { + if "/check-auth" == c.Request.URL.Path { // 跳过访问授权页 c.Next() return } @@ -228,11 +228,5 @@ func CheckAuth(c *gin.Context) { return } - if u := c.Query("url"); "" != u { - c.Redirect(302, u) - c.Abort() - return - } - c.Next() }