Closed ceefour closed 5 years ago
The current assumption is that either (for AWS API Gateway):
/
/basePath/stage
Meaning that by default, an app that works locally or with / basePath will get errors like:
Cannot GET /geo/v1/geoPlaces/findTopCityLikeByPopulation
When deployed to geo:* basePath.
geo:*
This is similar issue to https://github.com/awslabs/aws-serverless-express/issues/86 and https://github.com/claudiajs/claudia/issues/170
Currently I use a workaround like this:
module.exports.handler = async (event, context) => { // FIXME: Ugly workaround for https://github.com/awslabs/aws-serverless-express/issues/86 and https://github.com/claudiajs/claudia/issues/170 event.path = event.path.replace(/^\/geo\/v[^/]+/, '') return await handler(event, context) }
It'd be great if this use case can be explicitly supported by a configuration option, or at least, mentioned in the README.md / documentation for AWS provider.
README.md
The current assumption is that either (for AWS API Gateway):
/
basePath; or/
path prefix) and remote development paths (/basePath/stage
path prefix)Meaning that by default, an app that works locally or with
/
basePath will get errors like:When deployed to
geo:*
basePath.This is similar issue to https://github.com/awslabs/aws-serverless-express/issues/86 and https://github.com/claudiajs/claudia/issues/170
Currently I use a workaround like this:
It'd be great if this use case can be explicitly supported by a configuration option, or at least, mentioned in the
README.md
/ documentation for AWS provider.