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

Method refreshHeaders

src/cli/remoteIO.ts:74–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72 // When the parent process refreshes the token (via token file or env var),
73 // the transport can pick it up on reconnection.
74 const refreshHeaders = (): Record<string, string> => {
75 const h: Record<string, string> = {}
76 const freshToken = getSessionIngressAuthToken()
77 if (freshToken) {
78 h['Authorization'] = `Bearer ${freshToken}`
79 }
80 const freshErVersion = process.env.CLAUDE_CODE_ENVIRONMENT_RUNNER_VERSION
81 if (freshErVersion) {
82 h['x-environment-runner-version'] = freshErVersion
83 }
84 return h
85 }
86
87 // Get appropriate transport based on URL protocol
88 this.transport = getTransportForUrl(

Callers 2

handleConnectionErrorMethod · 0.80
handleConnectionErrorMethod · 0.80

Calls 1

Tested by

no test coverage detected