From c9102147a7f597f1ad20cc12f74daafcc2c275c0 Mon Sep 17 00:00:00 2001 From: Local Dev Date: Sun, 20 Sep 2026 18:38:31 +0200 Subject: [PATCH] fix(sirius-x): market page loads the BCH-priced scripts; Sia-served files get a short cache lifetime The market page had just moved to market/index.html and still referenced market.js and pricing.js under their previous query strings, so browsers kept the cached satoshi-priced versions. Tags are now in step across every page. The gateway also sends cache-control max-age=120 for everything it serves from Sia; those files carry no ETag, so browsers were applying heuristic caching and holding old scripts for hours. --- src/gateway/public-gateway.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gateway/public-gateway.mjs b/src/gateway/public-gateway.mjs index a78ab84..c497dea 100644 --- a/src/gateway/public-gateway.mjs +++ b/src/gateway/public-gateway.mjs @@ -418,6 +418,9 @@ async function serve(res, name, reqPath, baseHref) { // Public content: let pages on other origins (sirius.x, theseus.x) read a // name's files with fetch(), e.g. Sirius Studio inlining a stylesheet. res.setHeader("access-control-allow-origin", "*"); + // Short lifetime: without it browsers apply heuristic caching to files from + // Sia (no ETag) and keep old scripts for hours after a publish. + res.setHeader("cache-control", "public, max-age=120"); let entry; try { entry = await resolve(name); } catch (e) { res.writeHead(502); return res.end("resolve error: " + e.message); } if (!entry) { res.writeHead(404, { "content-type": "text/html" }); return res.end(nx(name)); }