From 5af5222423ffd84341145b1ef8c68abcdaba8d92 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 6 Apr 2024 12:15:39 +0200 Subject: Fix content-encoding check The files named `index.html.br` failed this check and would later not be found, falling back to the default identity encoding --- src/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.ts b/src/app.ts index 55d1f40..72708b6 100644 --- a/src/app.ts +++ b/src/app.ts @@ -87,7 +87,7 @@ async function walkDirectory(root: string) { const absPath = path.join(root, relPath); const stat = await fs.stat(absPath); if (stat.isFile()) { - if (relPath.endsWith("index.html")) { + if (relPath.includes("index.html")) { const dir = relPath.replace("index.html", ""); registerFile(relPath, dir, absPath, stat); } else { -- cgit 1.4.1