diff --git a/fizz-core/src/main/java/we/plugin/auth/ApiConfigService.java b/fizz-core/src/main/java/we/plugin/auth/ApiConfigService.java index 9736d7b..532d971 100644 --- a/fizz-core/src/main/java/we/plugin/auth/ApiConfigService.java +++ b/fizz-core/src/main/java/we/plugin/auth/ApiConfigService.java @@ -408,7 +408,7 @@ public class ApiConfigService implements ApplicationListener> auth(ServerWebExchange exchange) { diff --git a/fizz-core/src/main/java/we/plugin/auth/ServiceConfig.java b/fizz-core/src/main/java/we/plugin/auth/ServiceConfig.java index 6212c2e..0a4038e 100644 --- a/fizz-core/src/main/java/we/plugin/auth/ServiceConfig.java +++ b/fizz-core/src/main/java/we/plugin/auth/ServiceConfig.java @@ -122,48 +122,48 @@ public class ServiceConfig { } } - private void checkPathPattern(Map> pathPattern2apiConfigMap, boolean dedicatedLineRequest, String path, ArrayList result) { - Set>> entries = pathPattern2apiConfigMap.entrySet(); - // boolean clear = false; - for (Map.Entry> entry : entries) { - String pathPattern = entry.getKey(); - Set apiConfigs = entry.getValue(); - if (pathPattern.equals(path)) { - for (ApiConfig ac : apiConfigs) { - if (ac.allowAccess) { - /*if (!clear && !result.isEmpty()) { - result.clear(); - clear = true; - }*/ - if (dedicatedLineRequest) { - if (ac.dedicatedLine) { - result.add(ac); - } - } else { - if (!ac.dedicatedLine) { - result.add(ac); - } + private void checkPathPattern(Map> pathPattern2apiConfigMap, boolean dedicatedLineRequest, String path, ArrayList result) { + Set>> entries = pathPattern2apiConfigMap.entrySet(); + // boolean clear = false; + for (Map.Entry> entry : entries) { + String pathPattern = entry.getKey(); + Set apiConfigs = entry.getValue(); + if (pathPattern.equals(path)) { + for (ApiConfig ac : apiConfigs) { +// if (ac.allowAccess) { + /*if (!clear && !result.isEmpty()) { + result.clear(); + clear = true; + }*/ + if (dedicatedLineRequest) { + if (ac.dedicatedLine) { + result.add(ac); + } + } else { + if (!ac.dedicatedLine) { + result.add(ac); } } - } - /*if (clear && !result.isEmpty()) { - return; - }*/ - } else if (UrlTransformUtils.ANT_PATH_MATCHER.match(pathPattern, path)) { - for (ApiConfig ac : apiConfigs) { - if (ac.allowAccess) { - if (dedicatedLineRequest) { - if (ac.dedicatedLine) { - result.add(ac); - } - } else { - if (!ac.dedicatedLine) { - result.add(ac); - } - } - } - } +// } } - } // end for - } + /*if (clear && !result.isEmpty()) { + return; + }*/ + } else if (UrlTransformUtils.ANT_PATH_MATCHER.match(pathPattern, path)) { + for (ApiConfig ac : apiConfigs) { +// if (ac.allowAccess) { + if (dedicatedLineRequest) { + if (ac.dedicatedLine) { + result.add(ac); + } + } else { + if (!ac.dedicatedLine) { + result.add(ac); + } + } +// } + } + } + } // end for + } }