diff --git a/server.mjs b/server.mjs index 31186d9..c26782d 100644 --- a/server.mjs +++ b/server.mjs @@ -621,8 +621,8 @@ await mcpServer.connect(mcpTransport); const httpServer = http.createServer(async (req, res) => { const url = new URL(req.url, `http://${req.headers.host || 'localhost'}`); - // Auth gate — skip /health, /images/ and /logs - if (!url.pathname.startsWith('/health') && !url.pathname.startsWith('/images/') && !url.pathname.startsWith('/logs')) { + // Auth gate — skip public paths + if (!url.pathname.startsWith('/health') && !url.pathname.startsWith('/images/') && !url.pathname.startsWith('/logs') && url.pathname !== '/favicon.ico') { const auth = req.headers.authorization || ''; const expected = `Bearer ${MCP_TOKEN}`; if (auth !== expected) { @@ -653,6 +653,13 @@ const httpServer = http.createServer(async (req, res) => { return; } + // Suppress favicon requests + if (url.pathname === '/favicon.ico') { + res.statusCode = 204; + res.end(); + return; + } + process.stderr.write(`[HTTP] ${req.method} ${url.pathname} -> incoming\n`); try {