Skip to content

Commit 77dca81

Browse files
committed
Fix AuthScheme
1 parent e74c131 commit 77dca81

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api/v1/routes.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ func RegisterRoutes(e *echo.Echo, repoCache *environment.RepoCache, db *sql.DB)
4646

4747
e.Use(middleware.KeyAuthWithConfig(middleware.KeyAuthConfig{
4848
// We will probably use the "Bearer" scheme for OIDC
49-
AuthScheme: "Apikey",
49+
// Hack: Add colon as the old client used a colon. Echo used to support parsing without specifying the colon but a breaking change was introduced
50+
AuthScheme: "Apikey:",
5051
Validator: func(apikey string, c echo.Context) (bool, error) {
5152
return loginWithApiKey(c, loginService, apikey)
5253
},

0 commit comments

Comments
 (0)