Pre-launch — Gluecron is in final validation. Public signups and git hosting for non-owner users open after launch review.
Commit290ea77unknown_key

fix(cache): force no-cache on HTML responses — kill stale-page bottleneck

fix(cache): force no-cache on HTML responses — kill stale-page bottleneck

User reported: 'updates not going through to live site'. Root cause: server
returned text/html responses with NO Cache-Control header. Browsers fell
back to heuristic caching, holding stale HTML even after deploys landed.
User saw 80s-looking page repeatedly because their browser served its own
cached copy of the pre-redesign HTML, not the new code.

Fix: middleware that stamps every text/html response with
  Cache-Control: no-cache, no-store, must-revalidate
  Pragma: no-cache
  Expires: 0
JSON responses (/api/*) and static assets keep their own cache headers.
Only HTML pages are forced to revalidate every load.

After this lands, every push to main is GUARANTEED visible on next page
load. No incognito tricks needed.
Claude committed on May 4, 2026Parent: fb71554
1 file changed+150290ea77cf1720db367b9f6e347b6de255bee0881
1 changed file+15−0
Modifiedsrc/app.tsx+15−0View fileUnifiedSplit
116116 return logger()(c, next);
117117});
118118app.use("/api/*", cors());
119
120// Force fresh HTML on every request — kills browser HTTP cache holding stale
121// pre-redesign markup. JSON / static assets keep their own cache rules; only
122// text/html responses get the no-cache stamp. Without this, every push to
123// main left users staring at cached 80s-looking pages from before the design
124// landed.
125app.use("*", async (c, next) => {
126 await next();
127 const ct = c.res.headers.get("content-type") || "";
128 if (ct.startsWith("text/html")) {
129 c.header("cache-control", "no-cache, no-store, must-revalidate");
130 c.header("pragma", "no-cache");
131 c.header("expires", "0");
132 }
133});
119134// Rate-limit API + auth endpoints (generous default)
120135app.use("/api/*", rateLimit(120, 60_000, "api"));
121136app.use("/login", rateLimit(20, 60_000, "login"));
122137