From 085adaaa51faad3e6277012dba6b6923ab5441a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gast=C3=B3n=20Fournier?= Date: Tue, 19 Mar 2024 16:08:39 +0100 Subject: [PATCH] fix: authorization header typo (#6609) ## About the changes There seems to be a typo in the authorization header. We're keeping the old typo as preferred just in case, but if not present we'll default to the authorization header (not authorisation). Not sure about the impact of this bug, as all registrations might be using default project. --- src/lib/features/metrics/instance/register.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/features/metrics/instance/register.ts b/src/lib/features/metrics/instance/register.ts index 3a965dda81..00dda75d1f 100644 --- a/src/lib/features/metrics/instance/register.ts +++ b/src/lib/features/metrics/instance/register.ts @@ -79,7 +79,7 @@ export default class RegisterController extends Controller { private static extractProjectFromRequest( req: IAuthRequest, ) { - const token = req.get('Authorisation'); + const token = req.get('Authorisation') || req.headers.authorization; if (token) { return token.split(':')[0]; }