Skip to content

Commit

Permalink
Update auth.js
Browse files Browse the repository at this point in the history
  • Loading branch information
arielweinberger authored Apr 29, 2020
1 parent aca2d5c commit 64339d5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/handlers/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import jwt from 'jsonwebtoken';
// request is coming from, thus being efficient and optimising costs.
const generatePolicy = (principalId, methodArn) => {
const apiGatewayWildcard = methodArn.split('/', 2).join('/') + '/*';
console.log('methodArn', methodArn);
console.log('apiGatewayWildcard', apiGatewayWildcard);

return {
principalId,
Expand All @@ -16,7 +14,7 @@ const generatePolicy = (principalId, methodArn) => {
{
Action: 'execute-api:Invoke',
Effect: 'Allow',
Resource: '*',
Resource: apiGatewayWildcard,
},
],
},
Expand Down

0 comments on commit 64339d5

Please sign in to comment.