(configured: string | undefined, requestUrl: string)
| 135 | // before the OS assigns a listen port. That origin is not browser-reachable |
| 136 | // (Chrome ERR_UNSAFE_PORT), so approval URLs fall back to the request. |
| 137 | const resumeApprovalOrigin = (configured: string | undefined, requestUrl: string): string => { |
| 138 | if (configured === undefined || configured.length === 0) return requestUrl; |
| 139 | return new URL(configured).port === "0" ? requestUrl : configured; |
| 140 | }; |
| 141 | |
| 142 | export const createMcpRequestHandler = ( |
| 143 | input: ExecutorMcpServerConfig | LocalMcpRequestHandlerConfig, |
no outgoing calls
no test coverage detected