File tree Expand file tree Collapse file tree 1 file changed +0
-17
lines changed
Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Original file line number Diff line number Diff line change @@ -167,16 +167,6 @@ export class McpHub {
167167 }
168168 }
169169
170- private isLocalhost ( hostname : string ) : boolean {
171- return (
172- hostname === "localhost" ||
173- hostname === "127.0.0.1" ||
174- hostname === "::1" ||
175- hostname . endsWith ( ".localhost" ) ||
176- hostname . endsWith ( ".local" )
177- )
178- }
179-
180170 private async connectToServer ( name : string , config : z . infer < typeof ServerConfigSchema > ) : Promise < void > {
181171 // Remove existing connection if it exists
182172 await this . deleteConnection ( name )
@@ -251,15 +241,8 @@ export class McpHub {
251241 const sseOptions = {
252242 requestInit : {
253243 headers : config . headers ,
254- // Only disable certificate validation for local development connections
255- ...( this . isLocalhost ( new URL ( config . url ) . hostname ) && {
256- agent : new ( require ( "https" ) . Agent ) ( {
257- rejectUnauthorized : false ,
258- } ) ,
259- } ) ,
260244 } ,
261245 }
262- // @ts -ignore - EventSource types are not fully compatible
263246 global . EventSource = EventSource
264247 transport = new SSEClientTransport ( new URL ( config . url ) , sseOptions )
265248
You can’t perform that action at this time.
0 commit comments