mirror of
https://github.com/bknd-io/bknd.git
synced 2026-10-26 04:08:30 +00:00
fix: Match Bearer case-insensitively and trim whitespace(s)
This commit is contained in:
1 parent
feb3911d46
commit
4121597fa2
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user