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

Merge PR #52: no-cache on HTML responses

Merge PR #52: no-cache on HTML responses

fix(cache): no-cache on HTML responses — kill stale-page bottleneck</title>
<parameter name="body">Found it. The server was returning HTML with NO Cache-Control header. Browsers were serving stale HTML from their own cache, ignoring deploys. User saw 80s-looking pages because their browser was showing its OWN cached copy of pre-redesign HTML, not the new code.

Middleware now stamps every text/html response with no-cache/no-store/must-revalidate. Every push is guaranteed visible on next page load.</parameter>
</invoke>
CC LABS App committed on May 4, 2026Parents: 3566f54 290ea77
1 file changed+15084806b2093be25fc3cc3076cb38c7473328a9991
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