Skip to content

Commit

Permalink
fix: update authorization header parsing to be case-insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
getlarge committed Oct 7, 2024
1 parent b65c113 commit b3bafcf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const defaultOptions: OryAuthenticationGuardOptions = {
ctx
.switchToHttp()
.getRequest()
?.headers?.authorization?.replace('Bearer ', ''),
?.headers?.authorization?.replace(/bearer/i, ''),
cookieResolver: (ctx) => ctx.switchToHttp().getRequest()?.headers?.cookie,
unauthorizedFactory() {
return new UnauthorizedException();
Expand Down

0 comments on commit b3bafcf

Please sign in to comment.