diff --git a/app/restful-api/restful-api.go b/app/restful-api/restful-api.go index 8eedfd994..42180c43d 100644 --- a/app/restful-api/restful-api.go +++ b/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