From 984bc37e29fb8c487f9a10a3b56aa354cdd03019 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Thu, 17 Mar 2022 16:43:10 +0800 Subject: [PATCH] middleware --- internal/cms_api/middleware/jwt_auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cms_api/middleware/jwt_auth.go b/internal/cms_api/middleware/jwt_auth.go index f245fc4ad..a6f1af993 100644 --- a/internal/cms_api/middleware/jwt_auth.go +++ b/internal/cms_api/middleware/jwt_auth.go @@ -11,7 +11,7 @@ import ( func JWTAuth() gin.HandlerFunc { return func(c *gin.Context) { - ok, userID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + ok, userID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), "") log.NewInfo("0", utils.GetSelfFuncName(), "userID: ", userID) c.Set("userID", userID) if !ok {