1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

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.
This commit is contained in:
Gastón Fournier 2024-03-19 16:08:39 +01:00 committed by GitHub
parent 911b918817
commit 085adaaa51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -79,7 +79,7 @@ export default class RegisterController extends Controller {
private static extractProjectFromRequest( private static extractProjectFromRequest(
req: IAuthRequest<unknown, void, ClientApplicationSchema>, req: IAuthRequest<unknown, void, ClientApplicationSchema>,
) { ) {
const token = req.get('Authorisation'); const token = req.get('Authorisation') || req.headers.authorization;
if (token) { if (token) {
return token.split(':')[0]; return token.split(':')[0];
} }