mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
parent
686a31d6c6
commit
78b3130c93
1 changed files with 0 additions and 17 deletions
|
|
@ -167,16 +167,6 @@ export class McpHub {
|
|||
}
|
||||
}
|
||||
|
||||
private isLocalhost(hostname: string): boolean {
|
||||
return (
|
||||
hostname === "localhost" ||
|
||||
hostname === "127.0.0.1" ||
|
||||
hostname === "::1" ||
|
||||
hostname.endsWith(".localhost") ||
|
||||
hostname.endsWith(".local")
|
||||
)
|
||||
}
|
||||
|
||||
private async connectToServer(name: string, config: z.infer<typeof ServerConfigSchema>): Promise<void> {
|
||||
// Remove existing connection if it exists
|
||||
await this.deleteConnection(name)
|
||||
|
|
@ -251,15 +241,8 @@ export class McpHub {
|
|||
const sseOptions = {
|
||||
requestInit: {
|
||||
headers: config.headers,
|
||||
// Only disable certificate validation for local development connections
|
||||
...(this.isLocalhost(new URL(config.url).hostname) && {
|
||||
agent: new (require("https").Agent)({
|
||||
rejectUnauthorized: false,
|
||||
}),
|
||||
}),
|
||||
},
|
||||
}
|
||||
// @ts-ignore - EventSource types are not fully compatible
|
||||
global.EventSource = EventSource
|
||||
transport = new SSEClientTransport(new URL(config.url), sseOptions)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue