From 35469d28956dfca09cb1fbff657e6674e5bfd830 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Thu, 23 Nov 2023 15:10:17 -0500 Subject: [PATCH] fix(striker-ui-api): disable caching /init; not including reinit --- striker-ui-api/src/routes/static.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/striker-ui-api/src/routes/static.ts b/striker-ui-api/src/routes/static.ts index 0ad53ccb..5f3c23d4 100644 --- a/striker-ui-api/src/routes/static.ts +++ b/striker-ui-api/src/routes/static.ts @@ -47,6 +47,10 @@ router.use((...args) => { const { path: p } = rq; const target = '/init'; + // Prevent browsers from caching the initialize page to enable redirect + // after the init restart. + rs.setHeader('Cache-Control', 'must-revalidate, no-store'); + if (p.startsWith(target)) return nx(); return rs.redirect(target);