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类型