-
-
Notifications
You must be signed in to change notification settings - Fork 378
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
Handling for wildcard path segments broken variously by minor and patch releases after 3.3.1 #1012
Comments
The documentation does not clearly state whether or not wildcards segments in the middle of a path are supported or not, but they were de facto supported in IMHO there should be patch releases for |
Thanks for the detailed report. Allowing APIG REST
~ https://docs.aws.amazon.com/apigateway/latest/developerguide/setup-http-integrations.html APIG HTTP
~ https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-routes.html |
Fair enough. Hopefully mercilessly breaking changes will be held until a major version release in the future 😭. |
We try. I try and document changes for the next version in a github issue months ahead of time for feedback #940. Next release likely won't be till the fall |
In versions of middy <=
3.3.1
it was possible to use a wildcard path segment in the middle of a path (i.e./prefix/{proxy+}/suffix
). As of version3.3.2
URLs that would have matched this route no longer matched it, and as of3.6.0
middy started crashing on startup because of an invalid regex group name.Version that works fine (3.3.1): https://replit.com/@KumuPaul/MiddyPathIssueWorking#index.js
Test At: https://middypathissueworking.kumupaul.repl.co/prefix/example/path/suffix
Version that returns 404 (3.3.2): https://replit.com/@KumuPaul/MiddyPathIssueNotFound#index.js
Test At: https://middypathissuenotfound.kumupaul.repl.co/prefix/example/path/suffix
Version that crashes (3.6.0): https://replit.com/@KumuPaul/MiddyPathIssueCrash#index.js
Test At: https://middypathissuecrash.kumupaul.repl.co/prefix/example/path/suffix
To Reproduce
Given the following lambda handler:
Invoke this with an HTTP Get request at
/prefix/example/path/suffix
Error message in versions >=
3.6.0
:Expected behavior
Expected: 200 response
Actual:
.handler(httpRouterHandler(routes))
)Environment:
The text was updated successfully, but these errors were encountered: