(config: InspectorConfig)
| 14 | }; |
| 15 | |
| 16 | export const getMCPProxyAddress = (config: InspectorConfig): string => { |
| 17 | let proxyFullAddress = config.MCP_PROXY_FULL_ADDRESS.value as string; |
| 18 | if (proxyFullAddress) { |
| 19 | proxyFullAddress = proxyFullAddress.replace(/\/+$/, ""); |
| 20 | return proxyFullAddress; |
| 21 | } |
| 22 | |
| 23 | // Check for proxy port from query params, fallback to default |
| 24 | const proxyPort = |
| 25 | getSearchParam("MCP_PROXY_PORT") || DEFAULT_MCP_PROXY_LISTEN_PORT; |
| 26 | |
| 27 | return `${window.location.protocol}//${window.location.hostname}:${proxyPort}`; |
| 28 | }; |
| 29 | |
| 30 | export const getMCPServerRequestTimeout = (config: InspectorConfig): number => { |
| 31 | return config.MCP_SERVER_REQUEST_TIMEOUT.value as number; |
no test coverage detected