Merge pull request #1 from shivdeepak/fix-streamable-endpoint
fix cors issue with accessing mcp-session-id header
This commit is contained in:
@@ -39,6 +39,10 @@ const { values } = parseArgs({
|
|||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
app.use(cors());
|
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
|
const webAppTransports: Map<string, Transport> = new Map<string, Transport>(); // Transports by sessionId
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user