public static String getRealIp(HttpServletRequest request) {
		String ip = request.getHeader("X-Forwarded-For");
		if (StringUtils.isEmpty(ip)) {
			return request.getRemoteAddr();
		}
		ip = ip.split(", ")[0].trim();
		if ("127.0.0.1".equals(ip) || !isLicitIp(ip)) {
			return request.getRemoteAddr();
		}
		return ip;
	}