@remits/remits-cli 0.1.160 → 0.1.162
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/local-ai.js +4 -1
- package/package.json +1 -1
package/lib/local-ai.js
CHANGED
|
@@ -572,7 +572,10 @@ async function command({ subcommand, flags, context, root, axios, Client, WebSoc
|
|
|
572
572
|
webSocketFactory: () => new WebSocket(baseUrl.replace(/^http/, 'ws').replace(/\/+$/, '') + '/stomp'),
|
|
573
573
|
reconnectDelay: 5000, heartbeatIncoming: 10000, heartbeatOutgoing: 10000,
|
|
574
574
|
connectionTimeout: 15000, discardWebsocketOnCommFailure: true, debug: () => {},
|
|
575
|
-
|
|
575
|
+
// The STOMP connection has no HTTP session cookie. Use the same credential as polling;
|
|
576
|
+
// diagnostic user IDs are not authentication. STOMP resends these on every reconnect.
|
|
577
|
+
connectHeaders: { 'X-Auth-Token': session.token,
|
|
578
|
+
'x-remits-ws-label': 'remits-cli-ai', 'x-remits-user-id': String(session.user.id) },
|
|
576
579
|
onConnect: () => {
|
|
577
580
|
socket.subscribe('/topic/messages/' + topic, (message) => {
|
|
578
581
|
try {
|