Shelikhoo 4 лет назад
Родитель
Сommit
9f8f420ed3
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      app/restful-api/restful-api.go

+ 1 - 0
app/restful-api/restful-api.go

@@ -69,6 +69,7 @@ func (r *restfulService) TokenAuthMiddleware() gin.HandlerFunc {
 		if !strings.HasPrefix(auth, prefix) {
 			c.JSON(http.StatusUnauthorized, "unauthorized")
 			c.Abort()
+			return
 		}
 		auth = strings.TrimPrefix(auth, prefix)
 		if auth != r.config.AuthToken { // tip: Bearer: token123