Skip to content

Commit fc18e14

Browse files
authored
fix(ui): serve favicon from build root (#19)
1 parent 2b74946 commit fc18e14

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎src/http.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,16 @@ app.get("/assets/*", async (c) => {
8686
});
8787
});
8888

89+
// Vite copies public files to the build root, outside /assets.
90+
app.get("/favicon.svg", async (c) => {
91+
const filePath = join(UI_DIR, "favicon.svg");
92+
if (!existsSync(filePath)) return c.notFound();
93+
const buf = await readFile(filePath);
94+
return new Response(buf, {
95+
headers: { "Content-Type": "image/svg+xml" },
96+
});
97+
});
98+
8999
app.get("/", serveRoot);
90100

91101
// Streamable HTTP clients probe GET /mcp for an optional standalone SSE stream.

0 commit comments

Comments
 (0)