mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Accept lowercase Authorization tokens.
This commit is contained in:
@@ -19,7 +19,7 @@ export class BearerWebIdExtractor extends CredentialsExtractor {
|
||||
|
||||
public async canHandle({ headers }: HttpRequest): Promise<void> {
|
||||
const { authorization } = headers;
|
||||
if (!authorization || !authorization.startsWith('Bearer ')) {
|
||||
if (!authorization || !/^Bearer /ui.test(authorization)) {
|
||||
throw new NotImplementedHttpError('No Bearer Authorization header specified.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user