MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / extractBearer

Function extractBearer

mcp/src/http-server.ts:348–353  ·  view source on GitHub ↗
(req: Request)

Source from the content-addressed store, hash-verified

346}
347
348function extractBearer(req: Request): string | null {
349 const auth = req.headers.authorization;
350 if (!auth || typeof auth !== "string") return null;
351 const m = /^Bearer\s+(.+)$/i.exec(auth);
352 return m ? m[1]!.trim() : null;
353}
354
355function jsonRpcError(
356 body: unknown,

Callers 1

handleClientRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected