1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 02:19:55 +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:
Jermolene 2018-06-20 12:18:35 +01:00
parent 2a3f1b4403
commit c29f5a1b61

View File

@ -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;