🐛 fix: SPA HTML entry returns stale content after server upgrade (#12998)

fix: add no-cache header to SPA HTML entry point

Prevent stale SPA HTML from being served after server upgrades.
JS/CSS assets still cache normally via hashed filenames.
This commit is contained in:
Sirui He
2026-03-18 01:27:52 +08:00
committed by GitHub
parent 46455cb6c3
commit 3a789dc612

View File

@@ -220,6 +220,7 @@ export async function GET(
return new Response(html, {
headers: {
'Cache-Control': 'no-cache',
'content-type': 'text/html; charset=utf-8',
},
});