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

Function withCors

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

Source from the content-addressed store, hash-verified

411 routes: { ...staticRoutes },
412 async fetch(req) {
413 const withCors = (response: Response): Response =>
414 withCorsHeaders(req, response, corsAllowedHosts);
415
416 if (req.method === "OPTIONS" && req.headers.has("origin")) {
417 return corsPreflightResponse(req, corsAllowedHosts);

Callers 1

fetchFunction · 0.85

Calls 1

withCorsHeadersFunction · 0.85

Tested by

no test coverage detected