Skip to content

Commit

Permalink
Replace methodArn with wildcard
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronaldo Macapobre committed Feb 7, 2025
1 parent dd6dfbc commit 0049335
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aws/lambdas/auth/authorizer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ const generatePolicy = (
{
Action: "execute-api:Invoke",
Effect: effect,
Resource: resource,
// Replaces resource (Http Method and path) with wildcard to take advantage of caching
Resource: resource.replace(/\/[^/]+$/, "/*"),
},
],
};
Expand Down

0 comments on commit 0049335

Please sign in to comment.