Bug
gatewayWsUrl() in page-nodes.js (L26-30) constructs the WebSocket connection string using gon.get("port") — the server's internal bind port from config. When behind a reverse proxy or tunnel, this produces a wrong URL like wss://example.com:38309/ws instead of wss://example.com/ws.
function gatewayWsUrl() {
var proto = location.protocol === "https:" ? "wss:" : "ws:";
var port = gon.get("port") || location.port; // ← uses server bind port
var host = location.hostname;
return `${proto}//${host}${port ? `:${port}` : ""}/ws`;
}
Every other WebSocket connection in the codebase correctly uses location.host:
Fix
Align with the rest of the codebase:
function gatewayWsUrl() {
var proto = location.protocol === "https:" ? "wss:" : "ws:";
return `${proto}//${location.host}/ws`;
}
location.host already includes the correct hostname and port (or omits it when it's the default 443/80).
Bug
gatewayWsUrl()inpage-nodes.js(L26-30) constructs the WebSocket connection string usinggon.get("port")— the server's internal bind port from config. When behind a reverse proxy or tunnel, this produces a wrong URL likewss://example.com:38309/wsinstead ofwss://example.com/ws.Every other WebSocket connection in the codebase correctly uses
location.host:ws-connect.js`${proto}//${location.host}/ws/chat`page-settings.js`${wsProtocol}//${window.location.host}/graphql`page-terminal.js`${proto}//${location.host}/api/terminal/ws`Fix
Align with the rest of the codebase:
location.hostalready includes the correct hostname and port (or omits it when it's the default 443/80).