Skip to content

Commit

Permalink
Merge pull request #601 from juanjoDiaz/fix_scheme_creation_on_missin…
Browse files Browse the repository at this point in the history
…g_header

Fix Scheme creation to not throw on missing auth header
  • Loading branch information
dherault committed Feb 20, 2019
2 parents e30dbd7 + 72aee0c commit 0f84a91
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 0f84a91

Please sign in to comment.