From 946548b33aa288a9f5a3b853a39f6c0ff173a8b4 Mon Sep 17 00:00:00 2001 From: Steven Date: Wed, 16 Aug 2023 18:55:11 +0800 Subject: [PATCH] fix: access token checks --- api/v1/jwt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v1/jwt.go b/api/v1/jwt.go index 1666766..a1b77b6 100644 --- a/api/v1/jwt.go +++ b/api/v1/jwt.go @@ -71,7 +71,7 @@ func JWTMiddleware(s *APIV1Service, next echo.HandlerFunc, secret string) echo.H token := findAccessToken(c) if token == "" { // When the request is not authenticated, we allow the user to access the shortcut endpoints for those public shortcuts. - if util.HasPrefixes(path, "/s/*") && method == http.MethodGet { + if util.HasPrefixes(path, "/s/") && method == http.MethodGet { return next(c) } return echo.NewHTTPError(http.StatusUnauthorized, "Missing access token")