express-slash
express-slash copied to clipboard
Doesn't redirect for "all" routes.
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.