From d4c067d0baff81a308c01ea62a900075b0326b7d Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 12 Sep 2023 18:33:47 +0200 Subject: Rename variable --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index e524527..27af7a7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -26,14 +26,14 @@ type File = { let files = new Map(); -function registerFile(pathname: string, absPath: string, stat: Stats): void { +function registerFile(pathname: string, filename: string, stat: Stats): void { pathname = "/" + (pathname === "." || pathname === "./" ? "" : pathname); if (files.get(pathname) !== undefined) { console.warn("File already registered:", pathname); } files.set(pathname, { - filename: absPath, + filename, headers: pathname === "/404.html" ? Object.assign({}, defaultHeaders, { "cache-control": "no-cache" }) -- cgit 1.4.1