File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " roo-cline " : patch
3+ ---
4+
5+ Correctly pass headers to SSE MCP
Original file line number Diff line number Diff line change @@ -518,6 +518,13 @@ export class McpHub {
518518 const reconnectingEventSourceOptions = {
519519 max_retry_time : 5000 , // Maximum retry time in milliseconds
520520 withCredentials : configInjected . headers ?. [ "Authorization" ] ? true : false , // Enable credentials if Authorization header exists
521+ fetch : ( url : string | URL , init : RequestInit ) => {
522+ const headers = new Headers ( { ...( init ?. headers || { } ) , ...( configInjected . headers || { } ) } )
523+ return fetch ( url , {
524+ ...init ,
525+ headers,
526+ } )
527+ } ,
521528 }
522529 global . EventSource = ReconnectingEventSource
523530 transport = new SSEClientTransport ( new URL ( configInjected . url ) , {
You can’t perform that action at this time.
0 commit comments