-
Notifications
You must be signed in to change notification settings - Fork 672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
req.path is incorrect when path ends with slash #391
Comments
What is the purpose of giving priority to the pathparameters setting over the path? |
I'm having same issue. This problem cause because You can try 2 ways temporary to fix this issue. (1) Use Version 4.3.10 "@vendia/serverless-express": "4.3.10" Related #362, #397, #400, #441, #454, #455 In version 4.3.10, But, aware that (2) Change {proxy+} to {somethingelse+} with (version > 4.0.0 && version != 4.3.10) // Part of serverless.yml
- http:
path: '{any+}'
method: any With above configuration,
So, that line Also, aware that Might you can have trouble when migrating from {proxy+} to {any+} with using serverless framework.
So, I recommend to undeploy and deploy again as easiest way. See Also, serverless/serverless#3785 |
Hello This issue prevents me from detecting the trailing slash because Is it possible de make |
req.path is set like below.
2 is not correct, since Express actually set '/test/' to path in this case.
I think the cause is that the
req.path
is obtained fromevent.pathparameters.proxy
instead ofevent.path
, and the last slash is not included inevent.pathparameters.proxy
.The text was updated successfully, but these errors were encountered: