Merge pull request #1 from shivdeepak/fix-streamable-endpoint

fix cors issue with accessing mcp-session-id header
This commit is contained in:
Cliff Hall 2025-04-23 16:53:59 -04:00 • committed by GitHub
commit 498e49e2d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -39,6 +39,10 @@ const { values } = parseArgs({
const app = express();
app.use(cors());
app.use((req, res, next) => {
res.header("Access-Control-Expose-Headers", "mcp-session-id");
next();
});
const webAppTransports: Map<string, Transport> = new Map<string, Transport>(); // Transports by sessionId