fix(striker-ui-api): disable caching /init; not including reinit

main
Tsu-ba-me 1 year ago
parent 5550d6131c
commit 35469d2895
  1. 4
      striker-ui-api/src/routes/static.ts

@ -47,6 +47,10 @@ router.use((...args) => {
const { path: p } = rq; const { path: p } = rq;
const target = '/init'; 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(); if (p.startsWith(target)) return nx();
return rs.redirect(target); return rs.redirect(target);

Loading…
Cancel
Save