Prerequisites
🚀 Feature Proposal
I think it would help for the authorization header to be skipped if it is not Bearer type. No reason to throw an error if it is not the expected format.
Easies way to do it is to change this line
if ((request.headers && request.headers.authorization) && (!onlyCookie))
into
if ((request.headers && request.headers.authorization) && (!onlyCookie) && (/^Bearer/i.test(request.headers.authorization)))
Motivation
A good example is if you are using also the Basic auth on the same domain.
Example
No response
Prerequisites
🚀 Feature Proposal
I think it would help for the authorization header to be skipped if it is not Bearer type. No reason to throw an error if it is not the expected format.
Easies way to do it is to change this line
if ((request.headers && request.headers.authorization) && (!onlyCookie))into
if ((request.headers && request.headers.authorization) && (!onlyCookie) && (/^Bearer/i.test(request.headers.authorization)))Motivation
A good example is if you are using also the Basic auth on the same domain.
Example
No response