Эх сурвалжийг харах

访问控制需要排除本机docker和本127.0.01

wukai 2 жил өмнө
parent
commit
d2256e53c1

+ 2 - 3
doc-framework/src/main/java/com/doc/framework/interceptor/WhiteListInterceptor.java

@@ -31,9 +31,8 @@ public class WhiteListInterceptor implements HandlerInterceptor {
         if (StringUtils.isEmpty(whiteList) || no.equals(whiteList)) {
             return true;
         }
-        System.err.println(IpUtils.getIpAddr());
-        //需要排除本机docker的访问
-        whiteList += ";172.17.0.*";
+        //需要排除本机和docker的访问
+        whiteList += ";127.0.0.1;172.17.0.*";
         if (IpUtils.isMatchedIp(whiteList, IpUtils.getIpAddr())) {
             return true;
         } else {