MCPcopy
hub / github.com/codeaashu/claude-code / getSessionIngressAuthHeaders

Function getSessionIngressAuthHeaders

src/utils/sessionIngressAuth.ts:117–131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

115 * JWTs use Bearer auth.
116 */
117export function getSessionIngressAuthHeaders(): Record<string, string> {
118 const token = getSessionIngressAuthToken()
119 if (!token) return {}
120 if (token.startsWith('sk-ant-sid')) {
121 const headers: Record<string, string> = {
122 Cookie: `sessionKey=${token}`,
123 }
124 const orgUuid = process.env.CLAUDE_CODE_ORGANIZATION_UUID
125 if (orgUuid) {
126 headers['X-Organization-Uuid'] = orgUuid
127 }
128 return headers
129 }
130 return { Authorization: `Bearer ${token}` }
131}
132
133/**
134 * Update the session ingress auth token in-process by setting the env var.

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected