From f4e947b377f1009f8e3ebdaed861047634a06834 Mon Sep 17 00:00:00 2001 From: Sakurasan <1173092237@qq.com> Date: Sat, 10 Jun 2023 22:54:02 +0800 Subject: [PATCH] fix (#15) --- router/router.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/router/router.go b/router/router.go index 839f9af..d1427c7 100644 --- a/router/router.go +++ b/router/router.go @@ -118,6 +118,12 @@ func AuthMiddleware() gin.HandlerFunc { c.Abort() return } + if store.IsExistAuthCache(token[7:]) { + if strings.HasPrefix(c.Request.URL.Path, "/1/me") { + c.Next() + return + } + } if token[7:] != rootToken { u, err := store.GetUserByID(uint(1)) if err != nil {