diff --git a/apps/web/src/routes/dashboard.ts b/apps/web/src/routes/dashboard.ts index 4e1d465..1863630 100644 --- a/apps/web/src/routes/dashboard.ts +++ b/apps/web/src/routes/dashboard.ts @@ -82,10 +82,10 @@ async function getAccountId(cookie: any, headers: any): Promise { const dashDir = resolve(import.meta.dir, "../dashboard"); export const dashboard = new Elysia() - .get("/dashboard/app.js", () => Bun.file(`${dashDir}/app.js`)) - .get("/dashboard/app.css", () => Bun.file(`${dashDir}/app.css`)) - .get("/dashboard/tailwind.css", () => Bun.file(`${dashDir}/tailwind.css`)) - .get("/dashboard/query-builder.js", () => Bun.file(`${dashDir}/query-builder.js`)) + .get("/dashboard/app.js", () => new Response(Bun.file(`${dashDir}/app.js`), { headers: { "cache-control": "public, max-age=31536000, immutable" } })) + .get("/dashboard/app.css", () => new Response(Bun.file(`${dashDir}/app.css`), { headers: { "cache-control": "public, max-age=31536000, immutable" } })) + .get("/dashboard/tailwind.css", () => new Response(Bun.file(`${dashDir}/tailwind.css`), { headers: { "cache-control": "public, max-age=31536000, immutable" } })) + .get("/dashboard/query-builder.js", () => new Response(Bun.file(`${dashDir}/query-builder.js`), { headers: { "cache-control": "public, max-age=31536000, immutable" } })) // Login page .get("/dashboard", async ({ cookie }) => {