Dmitry Beresnev commited on
Commit
49e3c8a
·
1 Parent(s): 5cd7ce4

fix device pairing

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -0
  2. scripts/bootstrap_gateway_token.py +10 -0
Dockerfile CHANGED
@@ -47,6 +47,7 @@ ENV OPENCLAW_CONTROL_UI_BASE_PATH=/openclaw
47
  ENV OPENCLAW_ALLOWED_ORIGINS=https://researchengineering-agi-assistant.hf.space,http://127.0.0.1:7860,http://localhost:7860
48
  ENV OPENCLAW_TRUSTED_PROXIES=127.0.0.1,::1
49
  ENV OPENCLAW_CONTROL_UI_ALLOW_INSECURE_AUTH=1
 
50
 
51
  RUN mkdir -p /app/vault /app/.openclaw/state
52
 
 
47
  ENV OPENCLAW_ALLOWED_ORIGINS=https://researchengineering-agi-assistant.hf.space,http://127.0.0.1:7860,http://localhost:7860
48
  ENV OPENCLAW_TRUSTED_PROXIES=127.0.0.1,::1
49
  ENV OPENCLAW_CONTROL_UI_ALLOW_INSECURE_AUTH=1
50
+ ENV OPENCLAW_CONTROL_UI_DISABLE_DEVICE_AUTH=1
51
 
52
  RUN mkdir -p /app/vault /app/.openclaw/state
53
 
scripts/bootstrap_gateway_token.py CHANGED
@@ -32,6 +32,13 @@ def main() -> int:
32
  "yes",
33
  "on",
34
  }
 
 
 
 
 
 
 
35
 
36
  state_path = Path("/app/.openclaw/state/openclaw.json")
37
  state_path.parent.mkdir(parents=True, exist_ok=True)
@@ -61,6 +68,8 @@ def main() -> int:
61
  control_ui["basePath"] = control_ui_base_path
62
  control_ui["allowedOrigins"] = allowed_origins
63
  control_ui["allowInsecureAuth"] = allow_insecure_auth
 
 
64
  gateway["controlUi"] = control_ui
65
  gateway["trustedProxies"] = trusted_proxies
66
 
@@ -74,6 +83,7 @@ def main() -> int:
74
  f" allowedOrigins={allowed_origins}"
75
  f" trustedProxies={trusted_proxies}"
76
  f" allowInsecureAuth={allow_insecure_auth}"
 
77
  )
78
  return 0
79
 
 
32
  "yes",
33
  "on",
34
  }
35
+ disable_device_auth = os.getenv("OPENCLAW_CONTROL_UI_DISABLE_DEVICE_AUTH", "1").strip() in {
36
+ "1",
37
+ "true",
38
+ "True",
39
+ "yes",
40
+ "on",
41
+ }
42
 
43
  state_path = Path("/app/.openclaw/state/openclaw.json")
44
  state_path.parent.mkdir(parents=True, exist_ok=True)
 
68
  control_ui["basePath"] = control_ui_base_path
69
  control_ui["allowedOrigins"] = allowed_origins
70
  control_ui["allowInsecureAuth"] = allow_insecure_auth
71
+ # Break-glass for reverse-proxied hosted setups that cannot complete pairing reliably.
72
+ control_ui["dangerouslyDisableDeviceAuth"] = disable_device_auth
73
  gateway["controlUi"] = control_ui
74
  gateway["trustedProxies"] = trusted_proxies
75
 
 
83
  f" allowedOrigins={allowed_origins}"
84
  f" trustedProxies={trusted_proxies}"
85
  f" allowInsecureAuth={allow_insecure_auth}"
86
+ f" dangerouslyDisableDeviceAuth={disable_device_auth}"
87
  )
88
  return 0
89