lambda-api icon indicating copy to clipboard operation
lambda-api copied to clipboard

API Gateway Prefix

Open gakinson opened this issue 5 years ago • 1 comments
trafficstars

Hello,

Im not sure if this is an issue or if I have a setup issue, but if I do a domain mapping on API gateway then the paths no longer work correctly.

Example would be:

api.company.com/users -> maps to API gateway user service

api.get("/:userId", ....

then you call https://api.company.com/users/<some user id> , it will throw a route not found error.

gakinson avatar Sep 01 '20 17:09 gakinson

I am also seeing an issue passing in parameters. GET calls with no parameters work fine. With a parameter is failing. I get a 405 Method not allowed when calling these routes

Do you need to declare the variable?

api.get("/:userId/:userid

Then get it from either the req.params or req.query?

jebricker avatar Sep 28 '20 12:09 jebricker