From 2b3724a00a0f5af89ca6b00c9cc64c12bdfc6d12 Mon Sep 17 00:00:00 2001 From: lijun Date: Sat, 18 Jan 2025 21:14:21 +0800 Subject: [PATCH] =?UTF-8?q?release=E7=89=88=E6=9C=AC=EF=BC=8C=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E6=AF=8F=E5=B0=8F=E6=97=B6=E4=B8=80=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index 4857525..3f8d4da 100644 --- a/main.go +++ b/main.go @@ -183,13 +183,16 @@ func JWTAuthMiddleware() gin.HandlerFunc { if worker.IsContainSet("super_permission_tokens", tokenString) { s_id := c.Request.Header.Get("super_id") if s_id == "" { - c.AbortWithStatus(200) - c.JSON(200, gin.H{ - "message": "NOT_LOGIN", - "error": "super_id is empty", - "code": 3, - }) - return + s_id = c.Query("super_id") + if s_id == "" { + c.AbortWithStatus(200) + c.JSON(200, gin.H{ + "message": "NOT_LOGIN", + "error": "super_id is empty", + "code": 3, + }) + return + } } id, _ := strconv.Atoi(s_id) //查看s_id类型