You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2024/05/15 04:10:39 UTC
(incubator-devlake) branch main updated: fix(apikey): abort request if api key doesn't match (#7471)
This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 2a052dee8 fix(apikey): abort request if api key doesn't match (#7471)
2a052dee8 is described below
commit 2a052dee85d9380df583851418d6819863bc3fe0
Author: Lynwee <li...@merico.dev>
AuthorDate: Wed May 15 12:10:33 2024 +0800
fix(apikey): abort request if api key doesn't match (#7471)
---
backend/server/api/middlewares.go | 1 +
1 file changed, 1 insertion(+)
diff --git a/backend/server/api/middlewares.go b/backend/server/api/middlewares.go
index 32ec5e854..86c8c6a6f 100644
--- a/backend/server/api/middlewares.go
+++ b/backend/server/api/middlewares.go
@@ -121,6 +121,7 @@ func RestAuthentication(router *gin.Engine, basicRes context.BasicRes) gin.Handl
authHeader := c.GetHeader("Authorization")
ok := CheckAuthorizationHeader(c, logger, db, apiKeyHelper, authHeader, path)
if !ok {
+ c.Abort()
return
} else {
router.HandleContext(c)