-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat(rest): add strict option for routers #2419
Conversation
8bdfa7c
to
0482aa2
Compare
3dee3fa
to
460bb00
Compare
460bb00
to
0c6d48d
Compare
@hacksparrow Please take a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have bandwidth to review the changes in full detail. I don't see any obvious major problems, and since existing tests are passing, I guess this change is safe enough.
Please wait for @hacksparrow's review & approval before landing.
Should we describe this new option our documentation too? |
0c6d48d
to
0ae7f44
Compare
@hacksparrow Please review. |
0ae7f44
to
6af71de
Compare
Added. |
6af71de
to
3794f43
Compare
3794f43
to
3725913
Compare
This PR replaces #2355.
It introduces
strict
option for REST routers to deal with trailing slashes.strict
is true:/orders
matches route/orders
but not/orders/
/orders/
matches route/orders/
but not/orders
strict
is false (default)/orders
matches route/orders
first and falls back to/orders
/orders/
matches route/orders/
first and falls back to/orders
Checklist
npm test
passes on your machinepackages/cli
were updatedexamples/*
were updated