mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-12 22:55:45 +08:00
fix: auth middleware double responses on early rejection (#16444)
### Summary As title:
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user