diff --git a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/config/WebAppConfig.java b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/config/WebAppConfig.java index 6ec719587e..c955a7f555 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/config/WebAppConfig.java +++ b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/config/WebAppConfig.java @@ -25,7 +25,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(scanApiAuthInterceptor)//添加拦截器 .addPathPatterns("/**") //拦截所有请求 - .excludePathPatterns("/opback/addWhite*");//对应的不拦截的请求 + .excludePathPatterns("/opback/**");//对应的不拦截的请求 } } diff --git a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/interceptor/ScanApiAuthInterceptor.java b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/interceptor/ScanApiAuthInterceptor.java index 6ce851a45e..5df7bbb79e 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/interceptor/ScanApiAuthInterceptor.java +++ b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/interceptor/ScanApiAuthInterceptor.java @@ -31,6 +31,7 @@ public class ScanApiAuthInterceptor implements HandlerInterceptor { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { String ip = IpUtils.getIpAddr(request); + log.info("preHandle requestUrl",request.getRequestURL()); SetOperations setOperations = redisTemplate.opsForSet(); if (!setOperations.isMember(RedisKeys.getWhiteList(), ip)) { log.warn("preHandle ip:{} is not in whitelist", ip);