()
| 115 | * JWTs use Bearer auth. |
| 116 | */ |
| 117 | export 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. |
nothing calls this directly
no test coverage detected