|
|
|
@ -36,12 +36,12 @@ public class IpSendCheckServiceImpl implements SendCheckService {
|
|
|
|
|
|
|
|
|
|
//2. 如果IP白名单为null,直接放行
|
|
|
|
|
if (StringUtils.isEmpty(ip) || ip.contains(submit.getRealIp())) {
|
|
|
|
|
log.info("【接口模块-校验ip】 客户端请求IP合法!");
|
|
|
|
|
log.info("【接口模块-校验ip】客户端请求IP合法!{}", submit.getIpAddress());
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//3. IP白名单不为空,并且客户端请求不在IP报名单内
|
|
|
|
|
log.info("【接口模块-校验ip】 请求的ip不在白名单内");
|
|
|
|
|
log.info("【接口模块-校验ip】请求的ip不在白名单内!{}", submit.getIpAddress());
|
|
|
|
|
throw new ApiException(ExceptionEnums.IP_NOT_WHITE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|