From ccf1916e4e6359ba7b3267fdeb381bce5f185a9e Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Wed, 5 Mar 2025 19:56:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95shell=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index d3640ed..e1efb5b 100644 --- a/main.go +++ b/main.go @@ -105,6 +105,10 @@ func JWTAuthMiddleware() gin.HandlerFunc { if tokenString == "" { tokenString = c.Query("token") } + //测试 + if strings.Contains(c.Request.URL.Path, "/shell/") { + log.Printf("req token:%s ,path:%s", tokenString, c.Request.URL.Path) + } //如果请求为login或register,则不需要验证token for k, _ := range proto.Url_map { @@ -134,10 +138,6 @@ func JWTAuthMiddleware() gin.HandlerFunc { return } } - //测试 - if strings.Contains(c.Request.URL.Path, "/shell/") { - log.Printf("req token:%s ,path:%s", tokenString, c.Request.URL.Path) - } //查看token是否在超级token中 if worker.IsContainSet("super_permission_tokens", tokenString) {