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

Function corsPreflightResponse

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

Source from the content-addressed store, hash-verified

24import { parseTraceparent } from "./traceparent";
25
26const corsPreflightResponse = (): Response =>
27 new Response(null, {
28 status: 204,
29 headers: {
30 "access-control-allow-origin": "*",
31 "access-control-allow-methods": "GET, POST, DELETE, OPTIONS",
32 "access-control-allow-headers":
33 "content-type, authorization, mcp-session-id, accept, mcp-protocol-version",
34 "access-control-expose-headers": "mcp-session-id, WWW-Authenticate",
35 },
36 });
37
38const jsonRpcResponse = (
39 status: number,

Callers 1

makeCloudMcpAgentHandlerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected