Skip to content

Commit 4162b5b

Browse files
committed
fix: allow favicon endpoints without authentication
1 parent e2b309e commit 4162b5b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/transports/http.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,12 @@ const transports: Map<string, StreamableHTTPServerTransport> = new Map();
6565
*/
6666
function authMiddleware(requireAuth: boolean) {
6767
return async (req: Request, res: Response, next: NextFunction): Promise<void> => {
68-
// Skip auth for health check, server info (GET only), and OAuth endpoints
68+
// Skip auth for health check, server info (GET only), favicon, and OAuth endpoints
6969
// POST/DELETE to "/" is the MCP endpoint and requires auth
7070
if (
7171
req.path === "/health" ||
72+
req.path === "/favicon.svg" ||
73+
req.path === "/favicon.ico" ||
7274
(req.path === "/" && req.method === "GET") ||
7375
req.path.startsWith("/.well-known/") ||
7476
req.path.startsWith("/oauth/")

0 commit comments

Comments
 (0)