Skip to content
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

Doesn't redirect for "all" routes. #9

Open
dortamur opened this issue Dec 22, 2015 · 0 comments
Open

Doesn't redirect for "all" routes. #9

dortamur opened this issue Dec 22, 2015 · 0 comments

Comments

@dortamur
Copy link

I have an app that uses router.all() to support route accesses using multiple methods (typically a mix of GET and POST). For these routes, express-slash doesn't redirect to the right slash variant, even for methods such as GET.

Could a check please be added to support router.all()?

A quick check through the code and some light testing, and if I change index.js line 50 to:

return (route.methods[method] || route.methods._all) && layer.match(path);

...then that works for my own situation.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant