Skip to content

Commit 711dfad

Browse files
antfuclaude
andcommitted
chore: add debug logging for auth trust diagnostics in WS onConnected
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0ae503d commit 711dfad

File tree

1 file changed

+2
-1
lines changed
  • packages/core/src/node

1 file changed

+2
-1
lines changed

packages/core/src/node/ws.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ export async function createWsServer(options: CreateWsServerOptions) {
6161

6262
wsClients.add(ws)
6363
const color = meta.isTrusted ? c.green : c.yellow
64-
console.log(color`${MARK_INFO} Websocket client connected. [${meta.id}] [${meta.clientAuthToken}] (${meta.isTrusted ? 'trusted' : 'untrusted'})`)
64+
const trustedKeys = Object.keys(contextInternal.storage.auth.value().trusted)
65+
console.log(color`${MARK_INFO} Websocket client connected. [${meta.id}] [${meta.clientAuthToken}] (${meta.isTrusted ? 'trusted' : 'untrusted'}) authToken=${authToken} trustedKeys=${JSON.stringify(trustedKeys)} isClientAuthDisabled=${isClientAuthDisabled}`)
6566
},
6667
onDisconnected: (ws, meta) => {
6768
wsClients.delete(ws)

0 commit comments

Comments
 (0)