serverless-express icon indicating copy to clipboard operation
serverless-express copied to clipboard

API Gateway with custom domain and base path returns 404

Open traycho opened this issue 4 years ago • 0 comments

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 ?

traycho avatar Apr 17 '21 23:04 traycho