diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/app.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/app.ts b/src/app.ts index 7d5e448..da339c0 100644 --- a/src/app.ts +++ b/src/app.ts @@ -217,7 +217,10 @@ export const server = { status: status, headers: { location: newpath }, }); - } else if (files.has(pathname.replace(/index.html$/, ""))) { + } else if ( + pathname.endsWith("index.html") && + files.has(pathname.replace(/index.html$/, "")) + ) { newpath = pathname.replace(/index.html$/, ""); metrics.requests.inc({ content_encoding: contentEncoding, |