mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 23:13:43 +00:00
fix(doctor,configure): skip gateway auth for loopback-only setups
This commit is contained in:
@@ -123,14 +123,18 @@ export async function doctorCommand(
|
||||
note(gatewayDetails.remoteFallbackNote, "Gateway");
|
||||
}
|
||||
if (resolveMode(cfg) === "local") {
|
||||
const gatewayBind = cfg.gateway?.bind ?? "loopback";
|
||||
const tailscaleMode = cfg.gateway?.tailscale?.mode ?? "off";
|
||||
const requireGatewayAuth = gatewayBind !== "loopback" || tailscaleMode !== "off";
|
||||
const auth = resolveGatewayAuth({
|
||||
authConfig: cfg.gateway?.auth,
|
||||
tailscaleMode: cfg.gateway?.tailscale?.mode ?? "off",
|
||||
tailscaleMode,
|
||||
});
|
||||
const needsToken = auth.mode !== "password" && (auth.mode !== "token" || !auth.token);
|
||||
const needsToken =
|
||||
requireGatewayAuth && auth.mode !== "password" && (auth.mode !== "token" || !auth.token);
|
||||
if (needsToken) {
|
||||
note(
|
||||
"Gateway auth is off or missing a token. Token auth is now the recommended default (including loopback).",
|
||||
"Gateway auth is off or missing a token. Token auth is recommended when the gateway is exposed beyond local loopback.",
|
||||
"Gateway auth",
|
||||
);
|
||||
const shouldSetToken =
|
||||
|
||||
Reference in New Issue
Block a user