MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / resumeApprovalOrigin

Function resumeApprovalOrigin

apps/local/src/mcp.ts:137–140  ·  view source on GitHub ↗
(configured: string | undefined, requestUrl: string)

Source from the content-addressed store, hash-verified

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.
137const 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
142export const createMcpRequestHandler = (
143 input: ExecutorMcpServerConfig | LocalMcpRequestHandlerConfig,

Callers 1

createMcpRequestHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected