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
single-tiddler-mode
Jermolene 2018-06-20 12:18:35 +01:00
rodzic 2a3f1b4403
commit c29f5a1b61
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

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