From 165ead6a806f5b3ee340f461027e378a5cca46c3 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 18 Nov 2023 08:34:16 -0500 Subject: [PATCH] fix: strip root / --- src/backend/providers/s5.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/providers/s5.ts b/src/backend/providers/s5.ts index 683584c..37a0044 100644 --- a/src/backend/providers/s5.ts +++ b/src/backend/providers/s5.ts @@ -49,6 +49,9 @@ export default class S5Provider implements ContentProvider { } file = meta.paths[urlPath]; } else { + if (urlPath.startsWith("/")) { + urlPath = urlPath.substring(1); + } if (!(urlPath in meta.paths)) { throw new Error("404"); }