diff --git a/apps/stage-web/vite.config.ts b/apps/stage-web/vite.config.ts index 2560f0b5c..c204c878c 100644 --- a/apps/stage-web/vite.config.ts +++ b/apps/stage-web/vite.config.ts @@ -218,6 +218,10 @@ export default defineConfig({ }, workbox: { maximumFileSizeToCacheInBytes: 64 * 1024 * 1024, + // Cloudflare redirects /index.html to /. Cache the canonical response + // so navigation fallbacks never replay a redirected response. + modifyURLPrefix: { 'index.html': './' }, + navigateFallback: './', navigateFallbackDenylist: [ /^\/docs\//, /^\/ui\//,