mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Server command: map missing path to "/"
Otherwise, the user gets a 404 if we use a path prefix and the user omits the trailing slash
This commit is contained in:
parent
2a3f1b4403
commit
c29f5a1b61
@ -58,7 +58,7 @@ SimpleServer.prototype.findMatchingRoute = function(request,state) {
|
||||
match;
|
||||
if(pathprefix) {
|
||||
if(pathname.substr(0,pathprefix.length) === pathprefix) {
|
||||
pathname = pathname.substr(pathprefix.length);
|
||||
pathname = pathname.substr(pathprefix.length) || "/";
|
||||
match = potentialRoute.path.exec(pathname);
|
||||
} else {
|
||||
match = false;
|
||||
|
Loading…
Reference in New Issue
Block a user