Merge branch 'refs/heads/feat-cmd' into release
This commit is contained in:
commit
41eb5c6367
8
main.go
8
main.go
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue