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

Function withCors

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

Source from the content-addressed store, hash-verified

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

Callers 1

fetchFunction · 0.85

Calls 1

withCorsHeadersFunction · 0.85

Tested by

no test coverage detected