Fix: Force dashboard command to use localhost URL (#16434)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 3c03b4cc9b
Co-authored-by: BinHPdev <219093083+BinHPdev@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
Bin Deng
2026-02-15 04:00:58 +08:00
committed by GitHub
parent 9c5404d95e
commit b9d14855d0
5 changed files with 162 additions and 1 deletions

View File

@@ -25,9 +25,11 @@ export async function dashboardCommand(
const customBindHost = cfg.gateway?.customBindHost;
const token = cfg.gateway?.auth?.token ?? process.env.OPENCLAW_GATEWAY_TOKEN ?? "";
// LAN URLs fail secure-context checks in browsers.
// Coerce only lan->loopback and preserve other bind modes.
const links = resolveControlUiLinks({
port,
bind,
bind: bind === "lan" ? "loopback" : bind,
customBindHost,
basePath,
});