Docker: seed localhost control UI origin

This commit is contained in:
김채완
2026-03-24 13:40:10 +09:00
committed by Peter Steinberger
parent dbb806d257
commit 81be4b45a6
2 changed files with 2 additions and 2 deletions

View File

@@ -106,7 +106,7 @@ ensure_control_ui_allowed_origins() {
local allowed_origin_json
local current_allowed_origins
allowed_origin_json="$(printf '["http://127.0.0.1:%s"]' "$OPENCLAW_GATEWAY_PORT")"
allowed_origin_json="$(printf '["http://localhost:%s","http://127.0.0.1:%s"]' "$OPENCLAW_GATEWAY_PORT" "$OPENCLAW_GATEWAY_PORT")"
current_allowed_origins="$(
run_setup_cli config get gateway.controlUi.allowedOrigins 2>/dev/null || true
)"

View File

@@ -216,7 +216,7 @@ describe("scripts/docker/setup.sh", () => {
"run --rm --no-deps --entrypoint node openclaw-gateway dist/index.js config set gateway.bind lan",
);
expect(log).toContain(
'run --rm --no-deps --entrypoint node openclaw-gateway dist/index.js config set gateway.controlUi.allowedOrigins ["http://127.0.0.1:18789"] --strict-json',
'run --rm --no-deps --entrypoint node openclaw-gateway dist/index.js config set gateway.controlUi.allowedOrigins ["http://localhost:18789","http://127.0.0.1:18789"] --strict-json',
);
expect(log).not.toContain("run --rm openclaw-cli onboard --mode local --no-install-daemon");
});