diff --git a/server/index.ts b/server/index.ts index 997d2185..4bd1d4db 100644 --- a/server/index.ts +++ b/server/index.ts @@ -51,6 +51,17 @@ app.get("/.well-known/assetlinks.json", (c) => }, ]), ); +app.use( + "/*", + serveStatic({ + root: "app", + rewriteRequestPath: (path) => { + if (path.endsWith("/")) return `${path}/index.html`; + if (path.includes(".")) return path; + return `${path}.html`; + }, + }), +); app.onError((error, c) => { captureException(error, { level: "error" });