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

Function withCors

apps/local/src/serve.ts:380–381  ·  view source on GitHub ↗
(response: Response)

Source from the content-addressed store, hash-verified

378 routes: { ...staticRoutes },
379 async fetch(req) {
380 const withCors = (response: Response): Response =>
381 withCorsHeaders(req, response, corsAllowedHosts);
382
383 if (req.method === "OPTIONS" && req.headers.has("origin")) {
384 return corsPreflightResponse(req, corsAllowedHosts);

Callers 1

fetchFunction · 0.85

Calls 1

withCorsHeadersFunction · 0.85

Tested by

no test coverage detected