Skip to content

Commit 8645d37

Browse files
unraidclaude
andcommitted
fix: add Authorization header to peer message requests
getBridgeAccessToken() provides the OAuth Bearer token, matching the auth pattern used by bridgeApi.ts and codeSessionApi.ts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1d38eae commit 8645d37

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/bridge/peerSessions.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import axios from 'axios'
22
import { logForDebugging } from '../utils/debug.js'
33
import { errorMessage } from '../utils/errors.js'
4+
import { getBridgeAccessToken } from './bridgeConfig.js'
45
import { getReplBridgeHandle } from './replBridgeHandle.js'
56
import { toCompatSessionId } from './sessionIdCompat.js'
67

@@ -29,6 +30,11 @@ export async function postInterClaudeMessage(
2930
return { ok: false, error: 'No target session specified' }
3031
}
3132

33+
const accessToken = getBridgeAccessToken()
34+
if (!accessToken) {
35+
return { ok: false, error: 'No access token available' }
36+
}
37+
3238
const compatTarget = toCompatSessionId(target)
3339
const from = toCompatSessionId(handle.bridgeSessionId)
3440
const baseUrl = handle.sessionIngressUrl
@@ -44,6 +50,7 @@ export async function postInterClaudeMessage(
4450
},
4551
{
4652
headers: {
53+
Authorization: `Bearer ${accessToken}`,
4754
'Content-Type': 'application/json',
4855
'anthropic-version': '2023-06-01',
4956
},

0 commit comments

Comments
 (0)