File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,12 @@ const url = require('url')
33function getPathWithQueryStringParams ( {
44 event,
55 query = event . multiValueQueryStringParameters ,
6- // NOTE: Use `event.pathParameters.proxy` if available ({proxy+}); fall back to `event.path`
7- path = ( event . pathParameters && event . pathParameters . proxy && `/${ event . pathParameters . proxy } ` ) || event . path ,
6+ // NOTE: Always use event.path, if the API gateway has custom route setup, for example if my controllers path is
7+ // something like employee/services/service1, employee/services/service2 etc, if I dont have any custom path/resources setup
8+ // and directly have root/{proxy+} it works as expected, if i have a resource like /employee and child to that if there
9+ // is a resource like {proxy+} it is not working as expected and errors out with 404. This change is required to address that
10+ // specific issue.
11+ path = event . path ,
812 // NOTE: Strip base path for custom domains
913 stripBasePath = '' ,
1014 replaceRegex = new RegExp ( `^${ stripBasePath } ` )
You can’t perform that action at this time.
0 commit comments