CodeGenieApp / CodeGenieApp/serverless-express

API Gateway with custom domain and base path returns 404

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

Description

Upgrading from version 3.x to 4.x (Using Koa framework)

Api Gateway + custom domain + base path `job`

Event is coming as :
```
{
"resource": "/{proxy+}",
"path": "/job/status",
...
"pathParameters": {
"proxy": "status"
}
...
}
```
It seems `pathParameters.proxy` value is taken and `ctx.url` is set to `/job` instead of `/job/status` which ends up with 404.

@brett-vendia Is this somehow related to - https://github.com/vendia/serverless-express/blob/4b5ca7a5e90c7709b25b8fada30e13a76ed5c651/src/event-sources/utils.js#L8

Is there any way this stripBasePath to be configurable ?

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.