|
|
@@ -45,10 +45,11 @@ public class HttpInterceptor implements HandlerInterceptor {
|
|
|
*/
|
|
|
private void checkBlackIp(HttpServletRequest request) {
|
|
|
String clientIp = getClientIp(request);
|
|
|
+ String requestURI = request.getRequestURI();
|
|
|
String serviceName = StrUtil.replace(applicationName, "-service", "");
|
|
|
String str = redisService.getStr(StrUtil.format("blackIps:{}", serviceName));
|
|
|
if (StrUtil.isNotEmpty(str) && Arrays.asList(str.split(",")).contains(clientIp)) {
|
|
|
- throw new CommonException("not allow request");
|
|
|
+ throw new CommonException(StrUtil.format("{} not allow request:{}", clientIp, requestURI));
|
|
|
}
|
|
|
}
|
|
|
|