We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
getUserIpAddress
1 parent 738628c commit 985cae5Copy full SHA for 985cae5
frontend/src/lib/utils/ip.ts
@@ -27,6 +27,5 @@ function getPublicIP(ip: string | null | undefined): string | null {
27
export function getUserIpAddress(request: Request, getClientAddress: () => string) {
28
return getPublicIP(request.headers.get("cf-connecting-ip")) ||
29
getPublicIP(request.headers.get("x-real-ip")) ||
30
- getPublicIP(request.headers.get("x-forwarded-for")?.split(",")[0].trim()) ||
31
getClientAddress();
32
}
0 commit comments