Skip to content

Commit

Permalink
Fix Scheme creation to not throw on missing auth header
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjoDiaz committed Feb 20, 2019
1 parent e30dbd7 commit 72aee0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/createAuthScheme.js
Expand Up @@ -78,7 +78,7 @@ function createAuthScheme(
else {
const authorization = req.headers[identityHeader];

const matchedAuthorization = authorization.match(authorizerOptions.identityValidationExpression);
const matchedAuthorization = authorization && authorization.match(authorizerOptions.identityValidationExpression);
const finalAuthorization = (matchedAuthorization && matchedAuthorization[1]) || '';
debugLog(`Retrieved ${identityHeader} header ${finalAuthorization}`);
event = {
Expand Down

0 comments on commit 72aee0c

Please sign in to comment.