CodeGenieApp / serverless-express

Run Express and other Node.js frameworks on AWS Serverless technologies such as Lambda, API Gateway, Lambda@Edge, and more.
https://codegenie.codes
Apache License 2.0
5.13k stars 668 forks source link

[404 Not Found] API Gateway HTTP Protocol Path Matching with stage #653

Open anne-montoya opened 1 year ago

anne-montoya commented 1 year ago

We have an HTTP protocol API that has 2 deployment stages: test and prod. My understanding is the way the package match for a path is through the API Gateway Event rawPath property. When the API has stages the rawPath will look like this /{stage}/my-path and will not match with any path.

brett-vendia commented 1 year ago

Could you try the v5 branch https://github.com/vendia/serverless-express/pull/649? We'll merge this after additional verification.

mococa commented 1 year ago

please, fix this, I'm really craving this change. I don't want to have to buy a domain to test a simple feature in a framework i'm working on to get up and running with it

DavidFlorin commented 5 months ago

I have defined the routes using /:stage?/my-path so I can capture the stage and ignore it. I wait for v5 so I can get rid of this workaround