Browse Source

Revert "添加日志"

This reverts commit d721d6d2
dev_shibei_match
jianjun 4 years ago
parent
commit
3676c5ba17
  1. 3
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IpUtils.java

3
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IpUtils.java

@ -62,8 +62,6 @@ public class IpUtils {
if (StringUtils.isEmpty(ip) || IP_UNKNOWN.equalsIgnoreCase(ip)) { if (StringUtils.isEmpty(ip) || IP_UNKNOWN.equalsIgnoreCase(ip)) {
ip = request.getRemoteAddr(); ip = request.getRemoteAddr();
} }
logger.info("getIpAddr origin ip:{}",ip);
//对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割 //对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割
if (ip != null) { //"***.***.***.***".length() = 15 if (ip != null) { //"***.***.***.***".length() = 15
if (ip.indexOf(StrConstant.COMMA) > 0) { if (ip.indexOf(StrConstant.COMMA) > 0) {
@ -74,6 +72,7 @@ public class IpUtils {
} catch (Exception e) { } catch (Exception e) {
logger.error("IpUtils getIpAddr ERROR ", e); logger.error("IpUtils getIpAddr ERROR ", e);
} }
return ip; return ip;
} }

Loading…
Cancel
Save