···64646565 // if there's no matching file, try to treat it as a folder and use an index.html inside it
6666 if (!asset) {
6767- const path = req.url.slice(1).split("/").concat("index.html").join("/");
6767+ const path = req.url.slice(1).split("/").filter(Boolean).concat("index.html").join("/");
6868 asset = record.value.assets[path];
6969 }
7070