UNPKG

@sentry/remix

Version:
26 lines • 715 B
/** * Get the IP address of the client sending a request. * * It receives a Request headers object and use it to get the * IP address from one of the following headers in order. * * - X-Client-IP * - X-Forwarded-For * - Fly-Client-IP * - CF-Connecting-IP * - Fastly-Client-Ip * - True-Client-Ip * - X-Real-IP * - X-Cluster-Client-IP * - X-Forwarded * - Forwarded-For * - Forwarded * * If the IP address is valid, it will be returned. Otherwise, null will be * returned. * * If the header values contains more than one IP address, the first valid one * will be returned. */ export declare function getClientIPAddress(headers: Headers): string | null; //# sourceMappingURL=getIpAddress.d.ts.map