Skip to content

Commit 41ec9d5

Browse files
committed
Less crazy max-age for icons and CSS
1 parent 48a0bc3 commit 41ec9d5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ new Elysia()
1717
.use(wrap(log))
1818
// Use HTML plugin for rendering the index page
1919
.use(html())
20-
.get("/styles.css", () => new Response(Bun.file(new URL("./pub/styles.css", import.meta.url)), { headers: { "Content-Type": "text/css", "Cache-Control": "public, max-age=31536000" } }))
21-
.get("/favicon.ico", () => new Response(Bun.file(new URL("./pub/favicon.ico", import.meta.url)), { headers: { "Content-Type": "image/x-icon", "Cache-Control": "public, max-age=31536000" } }))
22-
.get("/retlector.png", () => new Response(Bun.file(new URL("./pub/retlector.png", import.meta.url)), { headers: { "Content-Type": "image/png", "Cache-Control": "public, max-age=31536000" } }))
20+
.get("/styles.css", () => new Response(Bun.file(new URL("./pub/styles.css", import.meta.url)), { headers: { "Content-Type": "text/css", "Cache-Control": "public, max-age=86400" } }))
21+
.get("/favicon.ico", () => new Response(Bun.file(new URL("./pub/favicon.ico", import.meta.url)), { headers: { "Content-Type": "image/x-icon", "Cache-Control": "public, max-age=86400" } }))
22+
.get("/retlector.png", () => new Response(Bun.file(new URL("./pub/retlector.png", import.meta.url)), { headers: { "Content-Type": "image/png", "Cache-Control": "public, max-age=86400" } }))
2323
.get("/", async () => {
2424
const activeGroups = [];
2525
for (const group of config.allowedGroups) {

0 commit comments

Comments
 (0)