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

Function corsPreflightResponse

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

Source from the content-addressed store, hash-verified

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

Callers 1

makeCloudMcpAgentHandlerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected