diff options
| author | dax <me@dax.ist> | 2026-08-04 07:13:58 +0000 |
|---|---|---|
| committer | dax <me@dax.ist> | 2026-08-04 07:13:58 +0000 |
| commit | 08fa2e1bee4e0bae417cfda508212e011eccf631 (patch) | |
| tree | 34267ff31c403796f61c73f6b0812c7e5213f184 /server.mjs | |
| parent | a32e5b41b785e7334af6f796adc6a1b5216a5cc9 (diff) | |
pathways: fix deployment (files now land in public/), cache-bust assets + no-cache html, stronger zoom gesture (0.04/tile)
Diffstat (limited to 'server.mjs')
| -rw-r--r-- | server.mjs | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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) } |
