Rename variable
Alan Pearce alan@alanpearce.eu
Tue, 12 Sep 2023 18:33:47 +0200
1 files changed, 2 insertions(+), 2 deletions(-)
jump to
M src/index.ts → src/index.ts
@@ -26,14 +26,14 @@ }; let files = new Map<string, File>(); -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" })