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

Function corsPreflightResponse

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

Source from the content-addressed store, hash-verified

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

Callers 1

makeCloudMcpAgentHandlerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected