We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0797ad5 commit 0a278d2Copy full SHA for 0a278d2
1 file changed
src/server/streamable_http_server.cpp
@@ -135,6 +135,12 @@ bool StreamableHttpServerWrapper::start()
135
// propagated to the catch handlers below.
136
apply_additional_response_headers(res);
137
138
+ // Expose response headers that cross-origin JS clients legitimately need to
139
+ // read. Without this, browsers hide Mcp-Session-Id from response.headers.get()
140
+ // even though it is sent on the wire, because browsers only expose a small
141
+ // whitelist of "safe" response headers by default.
142
+ res.set_header("Access-Control-Expose-Headers", "Mcp-Session-Id");
143
+
144
try
145
{
146
// Security: Check authentication if configured
0 commit comments