public static String extractClientIpFromXForwardedFor(String xForwardedFor) {
        if (xForwardedFor == null) {
            return null;
        }
        xForwardedFor = xForwardedFor.trim();
        String tokenized[] = xForwardedFor.split(",", -1);
        if (tokenized.length == 0) {
            return null;
        } else {
            return tokenized[0].trim();
        }
    }
Extract the client IP address from an x-forwarded-for header. Returns null if there is no x-forwarded-for header

@param xForwardedFor a <code>String</code> value
@return a <code>String</code> value
zuul-core/src/main/java/com/netflix/zuul/util/HttpUtils.java