From 08fa2e1bee4e0bae417cfda508212e011eccf631 Mon Sep 17 00:00:00 2001 From: dax Date: Tue, 4 Aug 2026 07:13:58 +0000 Subject: pathways: fix deployment (files now land in public/), cache-bust assets + no-cache html, stronger zoom gesture (0.04/tile) --- server.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server.mjs') diff --git a/server.mjs b/server.mjs index 3c10134..6659426 100644 --- a/server.mjs +++ b/server.mjs @@ -157,7 +157,9 @@ function serveFile(res, path) { res.writeHead(404).end("not found") return } - res.writeHead(200, { "Content-Type": MIME[extname(path)] || "application/octet-stream", "Cache-Control": "max-age=300" }) + const type = MIME[extname(path)] || "application/octet-stream" + const cache = path.endsWith(".html") ? "no-cache" : "max-age=300" + res.writeHead(200, { "Content-Type": type, "Cache-Control": cache }) createReadStream(path).pipe(res) } -- cgit v1.3.1