MCPcopy Create free account
hub / github.com/Shinplex/rever / checkAuth

Function checkAuth

workers/retool.ts:392–397  ·  view source on GitHub ↗
(req: Request)

Source from the content-addressed store, hash-verified

390 });
391}
392function checkAuth(req: Request): Response | void {
393 const h = req.headers.get("Authorization") || "";
394 const m = h.match(/^Bearer\s+(.+)$/i);
395 if (!m) return json({ error: "unauthorized" }, 401);
396 if (!VALID_CLIENT_KEYS.has(m[1].trim())) return json({ error: "forbidden" }, 403);
397}

Callers 1

fetchFunction · 0.85

Calls 1

jsonFunction · 0.85

Tested by

no test coverage detected