mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
* Pass headers to SSE * Add changeset
This commit is contained in:
parent
dabb95f2df
commit
116a50f7b4
2 changed files with 12 additions and 0 deletions
5
.changeset/nine-windows-read.md
Normal file
5
.changeset/nine-windows-read.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"roo-cline": patch
|
||||
---
|
||||
|
||||
Correctly pass headers to SSE MCP
|
||||
|
|
@ -518,6 +518,13 @@ export class McpHub {
|
|||
const reconnectingEventSourceOptions = {
|
||||
max_retry_time: 5000, // Maximum retry time in milliseconds
|
||||
withCredentials: configInjected.headers?.["Authorization"] ? true : false, // Enable credentials if Authorization header exists
|
||||
fetch: (url: string | URL, init: RequestInit) => {
|
||||
const headers = new Headers({ ...(init?.headers || {}), ...(configInjected.headers || {}) })
|
||||
return fetch(url, {
|
||||
...init,
|
||||
headers,
|
||||
})
|
||||
},
|
||||
}
|
||||
global.EventSource = ReconnectingEventSource
|
||||
transport = new SSEClientTransport(new URL(configInjected.url), {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue