You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by kl...@apache.org on 2026/08/08 00:33:41 UTC

(devlake) branch kw-serfix created (now d0d496c18)

This is an automated email from the ASF dual-hosted git repository.

klesh pushed a change to branch kw-serfix
in repository https://gitbox.apache.org/repos/asf/devlake.git


      at d0d496c18 fix: abort request context when apikey doesn't match

This branch includes the following new commits:

     new d0d496c18 fix: abort request context when apikey doesn't match

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(devlake) 01/01: fix: abort request context when apikey doesn't match

Posted by kl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

klesh pushed a commit to branch kw-serfix
in repository https://gitbox.apache.org/repos/asf/devlake.git

commit d0d496c182137c49c48c9c152bc1b8b42e55265a
Author: Klesh Wong <kl...@qq.com>
AuthorDate: Sat Aug 8 08:33:33 2026 +0800

    fix: abort request context when apikey doesn't match
---
 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 e1609b1ec..cb465e1c8 100644
--- a/backend/server/api/middlewares.go
+++ b/backend/server/api/middlewares.go
@@ -264,6 +264,7 @@ func CheckAuthorizationHeader(c *gin.Context, logger log.Logger, db dal.Dal, api
 		return false
 	}
 	if !matched {
+		c.Abort()
 		c.JSON(http.StatusForbidden, &apiBody{
 			Success: false,
 			Message: "path doesn't match api key's scope",