express-slash icon indicating copy to clipboard operation
express-slash copied to clipboard

Doesn't redirect for "all" routes.

Open dortamur opened this issue 9 years ago • 0 comments

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.

dortamur avatar Dec 22 '15 03:12 dortamur