/** * @omnifolio/rate-governor — IP Extraction Helpers * * Extract the real client IP from common proxy / CDN headers. * Works behind Cloudflare, AWS ALB, GCP Cloud Run, nginx, etc. * * Built by OmniFolio — https://omnifolio.app */ /** * Extract the client IP from a standard `Headers` object. * * Checks (in order): `cf-connecting-ip`, `x-forwarded-for`, `x-real-ip`. * Returns `'unknown'` if no IP can be determined. * * ```ts * const ip = getClientIP(request.headers); * const result = checkRateLimit(`ip:${ip}`, Presets.STANDARD); * ``` */ export declare function getClientIP(headers: { get(name: string): string | null; }): string; /** * Build a rate-limit identifier from a request. * * If a `userId` is provided, uses `user:{userId}`. * Otherwise falls back to `ip:{clientIP}`. */ export declare function buildIdentifier(headers: { get(name: string): string | null; }, userId?: string): string; //# sourceMappingURL=helpers.d.ts.map