opt: optimize the formula show styles

This commit is contained in:
RockYang
2024-03-21 11:04:12 +08:00
parent 264e77f383
commit 6aa1d27711
7 changed files with 76 additions and 20 deletions

View File

@@ -154,7 +154,7 @@ func authorizeMiddleware(s *AppServer, client *redis.Client) gin.HandlerFunc {
}
token, err := jwt.Parse(tokenString, func(token *jwt.Token) (interface{}, error) {
if _, ok := token.Method.(*jwt.SigningMethodHMAC); !ok {
if _, ok := token.Method.(*jwt.SigningMethodHMAC); !ok && needLogin(c) {
return nil, fmt.Errorf("unexpected signing method: %v", token.Header["alg"])
}
if isAdminApi {