diff --git a/server/util/util.go b/server/util/util.go index 04bd9f60..44853742 100644 --- a/server/util/util.go +++ b/server/util/util.go @@ -451,9 +451,9 @@ func ProcessXForwardedFor(ctx *gin.Context, clientIP, clientPort *string) { *clientIP = fwdAddress - multipleIPs := strings.Split(fwdAddress, ", ") + multipleIPs := strings.Split(fwdAddress, ",") if len(multipleIPs) > 1 { - *clientIP = multipleIPs[0] + *clientIP = strings.TrimSpace(multipleIPs[len(multipleIPs)-1]) } *clientPort = global.NotAvailable