Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix: auth middleware double responses on early rejection (#16444)

Haruko386c5e10a1578f2
diff --git a/internal/handler/auth.go b/internal/handler/auth.go
index d988dc33ac..895e76f4eb 100644
--- a/internal/handler/auth.go
+++ b/internal/handler/auth.go
@@ -129,6 +129,7 @@ func (h *AuthHandler) AuthMiddleware() gin.HandlerFunc {
"code": common.CodeForbidden,
"message": "Super user shouldn't access the URL",
})
+ c.Abort()
return
}
@@ -141,6 +142,7 @@ func (h *AuthHandler) AuthMiddleware() gin.HandlerFunc {
"message": errMsg,
"data": "No",
})
+ c.Abort()
return
}