@anyshift/mcp-proxy 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -363,14 +363,13 @@ async function main() {
|
|
|
363
363
|
const childTransport = new SSEClientTransport(new URL(REMOTE_URL), {
|
|
364
364
|
eventSourceInit: {
|
|
365
365
|
fetch: (url, init) => {
|
|
366
|
-
//
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
});
|
|
366
|
+
// Merge headers using the Headers API (case-insensitive set avoids duplicates
|
|
367
|
+
// when requestInit headers are also passed through init by the SDK)
|
|
368
|
+
const merged = new Headers(init?.headers);
|
|
369
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
370
|
+
merged.set(key, value);
|
|
371
|
+
}
|
|
372
|
+
return fetch(url, { ...init, headers: merged });
|
|
374
373
|
},
|
|
375
374
|
},
|
|
376
375
|
requestInit: { headers },
|