mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-17 21:43:06 +00:00
8 lines
314 B
TypeScript
8 lines
314 B
TypeScript
import type { Request } from 'express';
|
|
|
|
/** Only the router-verified trigger identity exempts the shared delivery transport from IP bans. */
|
|
export function getBanIp(
|
|
req: Pick<Request, 'ip'> & { _isAgentTrigger?: boolean },
|
|
): string | undefined {
|
|
return req._isAgentTrigger === true ? undefined : req.ip;
|
|
}
|