Merge branch 'refs/heads/feat-cmd' into release

This commit is contained in:
junleea 2025-03-05 19:56:27 +08:00
commit 41eb5c6367
1 changed files with 4 additions and 4 deletions

View File

@ -105,6 +105,10 @@ func JWTAuthMiddleware() gin.HandlerFunc {
if tokenString == "" { if tokenString == "" {
tokenString = c.Query("token") 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 //如果请求为login或register则不需要验证token
for k, _ := range proto.Url_map { for k, _ := range proto.Url_map {
@ -134,10 +138,6 @@ func JWTAuthMiddleware() gin.HandlerFunc {
return return
} }
} }
//测试
if strings.Contains(c.Request.URL.Path, "/shell/") {
log.Printf("req token:%s ,path:%s", tokenString, c.Request.URL.Path)
}
//查看token是否在超级token中 //查看token是否在超级token中
if worker.IsContainSet("super_permission_tokens", tokenString) { if worker.IsContainSet("super_permission_tokens", tokenString) {