From 39c96744d4e4e7dc96cf7d93d0a7a01938d931cc Mon Sep 17 00:00:00 2001 From: dd3xp Date: Tue, 2 Jun 2026 22:26:53 +0800 Subject: [PATCH] fix(desktop): CONDUCTOR_ORIGIN follows location.protocol (not hardcoded http) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BRIDGE_ORIGIN already used ${location.protocol}//; CONDUCTOR_ORIGIN was hardcoded to http://, which would have broken under HTTPS deployment with a Mixed Content block. Now both behave consistently — page over HTTPS uses https for conductor calls and wss for the WS already (the WS constant was already correct). Triggered by SakuraFrp requiring HTTPS access (TCP tunnels reject plain HTTP with 501). Tunnels now run with 自动 HTTPS enabled, so browser hits https://...:14168 / :18900, and frontend needs to use https in its constructed conductor URL. Bump app.js?v=84 -> 86 (skipping 85 — that was an auth-gate-only bump). --- frontends/desktop/static/app.js | 2 +- frontends/desktop/static/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontends/desktop/static/app.js b/frontends/desktop/static/app.js index d9c5598b..91b567e3 100644 --- a/frontends/desktop/static/app.js +++ b/frontends/desktop/static/app.js @@ -11,7 +11,7 @@ const BRIDGE_PORT = 14168; const CONDUCTOR_PORT = 8900; const BRIDGE_ORIGIN = `${location.protocol}//${location.hostname}:${BRIDGE_PORT}`; const BRIDGE_WS_ORIGIN = `${location.protocol === 'https:' ? 'wss:' : 'ws:'}//${location.hostname}:${BRIDGE_PORT}`; -const CONDUCTOR_ORIGIN = `http://${location.hostname}:${CONDUCTOR_PORT}`; +const CONDUCTOR_ORIGIN = `${location.protocol}//${location.hostname}:${CONDUCTOR_PORT}`; const CONDUCTOR_WS_ORIGIN = `${location.protocol === 'https:' ? 'wss:' : 'ws:'}//${location.hostname}:${CONDUCTOR_PORT}`; /* ═══════════════ 进程状态 store ═══════════════ */ diff --git a/frontends/desktop/static/index.html b/frontends/desktop/static/index.html index ce929bfd..3439b365 100644 --- a/frontends/desktop/static/index.html +++ b/frontends/desktop/static/index.html @@ -569,6 +569,6 @@ - +