about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2024-04-06 12:15:39 +0200
committerAlan Pearce2024-04-06 12:15:39 +0200
commit5af5222423ffd84341145b1ef8c68abcdaba8d92 (patch)
treec0c0399bbdfe6219dfb7368abde5fce006ab277b
parent1e10a92d6b87ab5327242ce996f2a8ca4b45fb15 (diff)
downloadwebsite-5af5222423ffd84341145b1ef8c68abcdaba8d92.tar.lz
website-5af5222423ffd84341145b1ef8c68abcdaba8d92.tar.zst
website-5af5222423ffd84341145b1ef8c68abcdaba8d92.zip
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
-rw-r--r--src/app.ts2
1 files changed, 1 insertions, 1 deletions
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 {