From 6aa6307d0e262bca7b53295fc3b896b3e9f81051 Mon Sep 17 00:00:00 2001 From: Oussama Douhou Date: Sat, 10 Jan 2026 23:57:15 +0100 Subject: [PATCH] fix: add static file routes for OG image and favicons --- src/index.ts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/index.ts b/src/index.ts index 47f5c1d..c54e0d2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -425,6 +425,41 @@ app.get('/app.js', async (c) => { }); }); +app.get('/og-image.png', async (c) => { + const file = Bun.file('./src/frontend/og-image.png'); + return new Response(file, { + headers: { 'Content-Type': 'image/png' } + }); +}); + +app.get('/favicon.svg', async (c) => { + const file = Bun.file('./src/frontend/favicon.svg'); + return new Response(file, { + headers: { 'Content-Type': 'image/svg+xml' } + }); +}); + +app.get('/favicon.ico', async (c) => { + const file = Bun.file('./src/frontend/favicon.ico'); + return new Response(file, { + headers: { 'Content-Type': 'image/x-icon' } + }); +}); + +app.get('/favicon.png', async (c) => { + const file = Bun.file('./src/frontend/favicon.png'); + return new Response(file, { + headers: { 'Content-Type': 'image/png' } + }); +}); + +app.get('/apple-touch-icon.png', async (c) => { + const file = Bun.file('./src/frontend/apple-touch-icon.png'); + return new Response(file, { + headers: { 'Content-Type': 'image/png' } + }); +}); + // Serve index.html for all other routes (SPA fallback) app.get('/', async (c) => { const file = Bun.file('./src/frontend/index.html');