MCPcopy Create free account
hub / github.com/freecodexyz/free-code / configureApiKeyHeaders

Function configureApiKeyHeaders

src/services/api/client.ts:341–351  ·  view source on GitHub ↗
(
  headers: Record<string, string>,
  isNonInteractiveSession: boolean,
)

Source from the content-addressed store, hash-verified

339}
340
341async function configureApiKeyHeaders(
342 headers: Record<string, string>,
343 isNonInteractiveSession: boolean,
344): Promise<void> {
345 const token =
346 process.env.ANTHROPIC_AUTH_TOKEN ||
347 (await getApiKeyFromApiKeyHelper(isNonInteractiveSession))
348 if (token) {
349 headers['Authorization'] = `Bearer ${token}`
350 }
351}
352
353function getCustomHeaders(): Record<string, string> {
354 const customHeaders: Record<string, string> = {}

Callers 1

getAnthropicClientFunction · 0.85

Calls 1

Tested by

no test coverage detected