CodeGenieApp / CodeGenieApp/serverless-express
req.path is incorrect when path ends with slash
Open
- Dominant language
- JavaScript
- Stars
- 5.3k
- Forks
- 676
- PR merge metrics
- No merged PRs in 30d
Description
req.path is set like below.
```
1. https://domain/test => req.path = '/test'
2. https://domain/test/ => req.path = '/test'
```
2 is not correct, since Express actually set '/test/' to path in this case.
I think the cause is that the `req.path` is obtained from `event.pathparameters.proxy` instead of `event.path`, and the last slash is not included in `event.pathparameters.proxy`.
Contributor guide
Assessment
This issue has not been assessed yet.