allow trailing slash for routes - fixes #2763
This commit is contained in:
parent
8c149d3653
commit
517661a606
3 changed files with 18 additions and 2 deletions
|
|
@ -13,7 +13,6 @@ module.exports = function(url) {
|
|||
if (!path) path = "/"
|
||||
else {
|
||||
if (path[0] !== "/") path = "/" + path
|
||||
if (path.length > 1 && path[path.length - 1] === "/") path = path.slice(0, -1)
|
||||
}
|
||||
return {
|
||||
path: path,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue