fix: send Origin header in gateway WebSocket connections

The Node.js ws library doesn't send an Origin header by default.
When the client identifies as openclaw-control-ui, the gateway
enforces origin checks and rejects connections with missing origin.

Pass the gateway URL as the Origin header so the gateway's
local-loopback check sees a valid loopback origin and allows it.

Bump to v2.3.20.

Made-with: Cursor
This commit is contained in:
Mark Rachapoom 2026-03-20 19:26:09 -07:00
parent 587dd6ae64
commit c38d1281d4
2 changed files with 2 additions and 2 deletions

View File

@ -556,7 +556,7 @@ class GatewayWsClient {
if (this.ws) {
return;
}
const ws = new NodeWebSocket(this.settings.url);
const ws = new NodeWebSocket(this.settings.url, { origin: this.settings.url });
this.ws = ws;
// Attach message/close handlers BEFORE awaiting "open" so that

View File

@ -1,6 +1,6 @@
{
"name": "denchclaw",
"version": "2.3.19",
"version": "2.3.20",
"description": "Fully Managed OpenClaw Framework for managing your CRM, Sales Automation and Outreach agents. The only local productivity tool you need.",
"keywords": [],
"homepage": "https://github.com/DenchHQ/DenchClaw#readme",