Release/0.21 #6

Merged
shishantbiswas merged 45 commits from release/0.21 into main 2026-09-26 13:17:01 +00:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 4121597fa2 - Show all commits
+1 -1
View File
@@ -121,7 +121,7 @@ export class Api {
}
// try authorization header
const headerToken = this.options.headers.get("authorization")?.replace("Bearer ", "");
const headerToken = this.options.headers.get("authorization")?.replace(/^Bearer\s+/i, "");
if (headerToken) {
this.token_transport = "header";
this.updateToken(headerToken);
+1 -1
View File
@@ -430,7 +430,7 @@ export class Authenticator<
let token: string | undefined;
if (headers.has("Authorization")) {
const bearerHeader = String(headers.get("Authorization"));
token = bearerHeader.replace("Bearer ", "");
token = bearerHeader.replace(/^Bearer\s+/i, "");
} else {
const context = is_context ? (c as Context) : ({ req: { raw: { headers } } } as Context);
token = await this.getAuthCookie(context);