mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-19 05:50:47 +00:00
fix(gateway-cli): allow lan binding with trusted-proxy in CLI startup
There were TWO validations for lan binding without auth: 1. src/gateway/server-runtime-config.ts (FIXED in 563052d) 2. src/cli/gateway-cli/run.ts (THIS FIX) The CLI startup validation was rejecting lan binding when using trusted-proxy auth mode because it only checked for token/password. This is the ACTUAL bug causing the crash loop - the CLI validation runs before the runtime config validation, so it was failing first. Fix: Add && resolvedAuthMode !== 'trusted-proxy' to the CLI check on line 246, matching the fix in server-runtime-config.ts.
This commit is contained in:
committed by
Peter Steinberger
parent
a9f7069060
commit
57ae179bbc
@@ -247,7 +247,7 @@ async function runGatewayCommand(opts: GatewayRunOpts) {
|
||||
defaultRuntime.exit(1);
|
||||
return;
|
||||
}
|
||||
if (bind !== "loopback" && !hasSharedSecret) {
|
||||
if (bind !== "loopback" && !hasSharedSecret && resolvedAuthMode !== "trusted-proxy") {
|
||||
defaultRuntime.error(
|
||||
[
|
||||
`Refusing to bind gateway to ${bind} without auth.`,
|
||||
|
||||
Reference in New Issue
Block a user