mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 00:51:25 +00:00
fix(gateway): trusted-proxy auth rejected when bind=loopback (#20097)
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: 8de62f1a8f
Co-authored-by: xinhuagu <562450+xinhuagu@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
This commit is contained in:
@@ -117,11 +117,6 @@ export async function resolveGatewayRuntimeConfig(params: {
|
||||
}
|
||||
|
||||
if (authMode === "trusted-proxy") {
|
||||
if (isLoopbackHost(bindHost)) {
|
||||
throw new Error(
|
||||
"gateway auth mode=trusted-proxy makes no sense with bind=loopback; use bind=lan or bind=custom with gateway.trustedProxies configured",
|
||||
);
|
||||
}
|
||||
if (trustedProxies.length === 0) {
|
||||
throw new Error(
|
||||
"gateway auth mode=trusted-proxy requires gateway.trustedProxies to be configured with at least one proxy IP",
|
||||
|
||||
Reference in New Issue
Block a user