mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 18:28:26 +00:00
refactor(gateway): harden proxy client ip resolution
This commit is contained in:
@@ -12,6 +12,7 @@ export async function handleGatewayPostJsonEndpoint(
|
||||
auth: ResolvedGatewayAuth;
|
||||
maxBodyBytes: number;
|
||||
trustedProxies?: string[];
|
||||
allowRealIpFallback?: boolean;
|
||||
rateLimiter?: AuthRateLimiter;
|
||||
},
|
||||
): Promise<false | { body: unknown } | undefined> {
|
||||
@@ -30,6 +31,7 @@ export async function handleGatewayPostJsonEndpoint(
|
||||
res,
|
||||
auth: opts.auth,
|
||||
trustedProxies: opts.trustedProxies,
|
||||
allowRealIpFallback: opts.allowRealIpFallback,
|
||||
rateLimiter: opts.rateLimiter,
|
||||
});
|
||||
if (!authorized) {
|
||||
|
||||
Reference in New Issue
Block a user