feat 排队
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"common/utils"
|
||||
"fmt"
|
||||
"gateway/config"
|
||||
"gateway/internal/global"
|
||||
"github.com/gin-contrib/cors"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
@@ -45,7 +46,7 @@ func authJwt() gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
// 如果是Public接口,有Token就读,没有就算了
|
||||
public := false
|
||||
for _, path := range config.PublicPaths {
|
||||
for _, path := range global.PublicPaths {
|
||||
if strings.HasPrefix(c.Request.URL.Path, path) {
|
||||
public = true
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user