CodeGenieApp / CodeGenieApp/serverless-express

Req.url incorrectly evaluated for paths with nested proxy - ApiGateway

Open
#400 5 comments 7 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.3k
Forks
676
PR merge metrics
No merged PRs in 30d

Description

GIven the following resource `/testing/{proxy+}` a call to `/testing/creategroup` is evaluated to `/creategroup` rather than `/testing/creatgroup`.

Looking at [getPathWithQueryStringParams](https://github.com/vendia/serverless-express/blob/671f914429e9708bfb1ee6ba76b5947a917592df/src/event-sources/utils.js#L7), it appears that if proxy pathParameter is present, it is simply used, discarding the other parts. Would substituting the value for proxy for the token {proxxy+} into `event.resource` (/testing/{proxy+}) be a potential approach to fixing this?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.