Revert re-parsing url

This commit is contained in:
olaservo 2025-04-30 05:16:00 -07:00
commit fe827426ae

View file

@ -280,7 +280,6 @@ export function useConnection({
return; return;
} }
let mcpProxyServerUrl; let mcpProxyServerUrl;
const originalUrl = new URL(sseUrl);
switch (transportType) { switch (transportType) {
case "stdio": case "stdio":
@ -292,12 +291,12 @@ export function useConnection({
case "sse": case "sse":
mcpProxyServerUrl = new URL(`${getMCPProxyAddress(config)}/sse`); mcpProxyServerUrl = new URL(`${getMCPProxyAddress(config)}/sse`);
mcpProxyServerUrl.searchParams.append("url", originalUrl.toString()); mcpProxyServerUrl.searchParams.append("url", sseUrl);
break; break;
case "streamable-http": case "streamable-http":
mcpProxyServerUrl = new URL(`${getMCPProxyAddress(config)}/mcp`); mcpProxyServerUrl = new URL(`${getMCPProxyAddress(config)}/mcp`);
mcpProxyServerUrl.searchParams.append("url", originalUrl.toString()); mcpProxyServerUrl.searchParams.append("url", sseUrl);
break; break;
} }
(mcpProxyServerUrl as URL).searchParams.append( (mcpProxyServerUrl as URL).searchParams.append(