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

Function withCors

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

Source from the content-addressed store, hash-verified

406 routes: { ...staticRoutes },
407 async fetch(req) {
408 const withCors = (response: Response): Response =>
409 withCorsHeaders(req, response, corsAllowedHosts);
410
411 if (req.method === "OPTIONS" && req.headers.has("origin")) {
412 return corsPreflightResponse(req, corsAllowedHosts);

Callers 1

fetchFunction · 0.85

Calls 1

withCorsHeadersFunction · 0.85

Tested by

no test coverage detected