Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 976bdce

Browse files
author
Je
committed
refactor: don't render favicon.ico
1 parent 799254f commit 976bdce

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

server/server.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,15 @@ export async function start(appDir: string, port: number, isDev = false) {
179179
}
180180
}
181181

182+
if (pathname === '/favicon.ico') {
183+
req.respond({
184+
status: 404,
185+
headers: new Headers({ 'Content-Type': 'text/plain' }),
186+
body: 'icon not found'
187+
})
188+
continue
189+
}
190+
182191
// ssr
183192
const [status, html] = await project.getPageHtml({ pathname, search: url.search })
184193
req.respond({

0 commit comments

Comments
 (0)