Update streamableHttp.ts

This commit is contained in:
qikaigao 2025-04-17 15:38:12 -07:00 • committed by GitHub
commit 1df348710b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -480,11 +480,7 @@ export class StreamableHTTPServerTransport implements Transport {
}));
return false;
}
if (this.sessionId === undefined) {
// If the session ID is not set, the session management is disabled
// and we don't need to validate the session ID
return true;
}
const sessionId = req.headers["mcp-session-id"];
if (!sessionId) {