Skip to content

Commit 985cae5

Browse files
committed
refactor: simplify IP extraction logic in getUserIpAddress function
1 parent 738628c commit 985cae5

File tree

1 file changed

+0
-1
lines changed
  • frontend/src/lib/utils

1 file changed

+0
-1
lines changed

frontend/src/lib/utils/ip.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,5 @@ function getPublicIP(ip: string | null | undefined): string | null {
2727
export function getUserIpAddress(request: Request, getClientAddress: () => string) {
2828
return getPublicIP(request.headers.get("cf-connecting-ip")) ||
2929
getPublicIP(request.headers.get("x-real-ip")) ||
30-
getPublicIP(request.headers.get("x-forwarded-for")?.split(",")[0].trim()) ||
3130
getClientAddress();
3231
}

0 commit comments

Comments
 (0)