CodeGenieApp / CodeGenieApp/serverless-express
API Gateway with custom domain and base path returns 404
- Lenguaje dominante
- JavaScript
- Estrellas
- 5.3k
- Forks
- 676
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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 ?
Guía de contribución
Línea de trabajo
Start with src/event-sources/utils.js at the referenced line and trace how pathParameters.proxy is used when building the Koa request URL. Reproduce the supplied API Gateway event with custom domain base path `job`; done means the `/job/status` request no longer returns 404 and the base-path stripping behavior can be configured as requested.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- aws, javascript, node.js
- Área
- api, backend, cloud
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100