MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getApiKeyFromRequest

Function getApiKeyFromRequest

web/src/app/api/admin/relabel-for-user/route.ts:546–553  ·  view source on GitHub ↗

* Extract API key from Authorization header (Bearer token)

(req: NextRequest)

Source from the content-addressed store, hash-verified

544 * Extract API key from Authorization header (Bearer token)
545 */
546function getApiKeyFromRequest(req: NextRequest): string | null {
547 const authHeader = req.headers.get('Authorization')
548 if (!authHeader?.startsWith('Bearer ')) {
549 return null
550 }
551 const token = authHeader.slice(7).trim()
552 return token || null
553}
554
555async function ensureBigQuery() {
556 if (!bigqueryReady) {

Callers 1

POSTFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected