Skip to content

Commit

Permalink
handle authorization header in cors when is upper cased. fixes #180, #…
Browse files Browse the repository at this point in the history
  • Loading branch information
jfromaniello committed Apr 20, 2022
1 parent 624bf73 commit ab0ee80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const expressjwt = (options: Params) => {
if (req.method === 'OPTIONS' && 'access-control-request-headers' in req.headers) {
const hasAuthInAccessControl = req.headers['access-control-request-headers']
.split(',')
.map(header => header.trim())
.map(header => header.trim().toLowerCase())
.includes('authorization');
if (hasAuthInAccessControl) {
return next();
Expand Down

0 comments on commit ab0ee80

Please sign in to comment.