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

Function corsPreflightResponse

apps/cloud/src/mcp/agent-handler.ts:37–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35const MCP_SESSION_UNAVAILABLE_MESSAGE = "Session storage temporarily unavailable - please retry";
36
37const corsPreflightResponse = (): Response =>
38 new Response(null, {
39 status: 204,
40 headers: {
41 "access-control-allow-origin": "*",
42 "access-control-allow-methods": "GET, POST, DELETE, OPTIONS",
43 "access-control-allow-headers":
44 "content-type, authorization, mcp-session-id, accept, mcp-protocol-version",
45 "access-control-expose-headers": "mcp-session-id, WWW-Authenticate",
46 },
47 });
48
49const jsonRpcResponse = (
50 status: number,

Callers 1

makeCloudMcpAgentHandlerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected