fix(doctor): skip token generation for trusted-proxy and none auth mo… · openclaw/openclaw@a43be09
wujiaming88
·
2026-04-22
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -123,7 +123,15 @@ async function runGatewayAuthHealth(ctx: DoctorHealthFlowContext): Promise<void>
|
123 | 123 | authConfig: ctx.cfg.gateway?.auth, |
124 | 124 | tailscaleMode: ctx.cfg.gateway?.tailscale?.mode ?? "off", |
125 | 125 | }); |
126 | | -const needsToken = auth.mode !== "password" && (auth.mode !== "token" || !auth.token); |
| 126 | +// Modes that don't need a token: password, none, trusted-proxy. |
| 127 | +// This aligns with hasExplicitGatewayInstallAuthMode() in auth-install-policy.ts. |
| 128 | +// Previously, only "password" and "token" (with a token present) were excluded, |
| 129 | +// causing doctor --fix to overwrite trusted-proxy/none configs with token mode. |
| 130 | +const needsToken = |
| 131 | +auth.mode !== "password" && |
| 132 | +auth.mode !== "none" && |
| 133 | +auth.mode !== "trusted-proxy" && |
| 134 | +(auth.mode !== "token" || !auth.token); |
127 | 135 | if (!needsToken) { |
128 | 136 | return; |
129 | 137 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。