Skip to content

Commit

Permalink
fix: authorization header typo (#6609)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
gastonfournier committed Mar 19, 2024
1 parent 911b918 commit 085adaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/features/metrics/instance/register.ts
Expand Up @@ -79,7 +79,7 @@ export default class RegisterController extends Controller {
private static extractProjectFromRequest(
req: IAuthRequest<unknown, void, ClientApplicationSchema>,
) {
const token = req.get('Authorisation');
const token = req.get('Authorisation') || req.headers.authorization;
if (token) {
return token.split(':')[0];
}
Expand Down

0 comments on commit 085adaa

Please sign in to comment.