|
|
@ -90,12 +90,9 @@ public class PathRoutePredicateFactory extends AbstractRoutePredicateFactory<Pat |
|
|
|
return new GatewayPredicate() { |
|
|
|
return new GatewayPredicate() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public boolean test(ServerWebExchange exchange) { |
|
|
|
public boolean test(ServerWebExchange exchange) { |
|
|
|
PathContainer path = (PathContainer) exchange.getAttributes() |
|
|
|
PathContainer path = (PathContainer) exchange.getAttributes().computeIfAbsent( |
|
|
|
.get(GATEWAY_PREDICATE_PATH_CONTAINER_ATTR); |
|
|
|
GATEWAY_PREDICATE_PATH_CONTAINER_ATTR, |
|
|
|
if (path == null) { |
|
|
|
s -> parsePath(exchange.getRequest().getURI().getRawPath())); |
|
|
|
path = parsePath(exchange.getRequest().getURI().getRawPath()); |
|
|
|
|
|
|
|
exchange.getAttributes().put(GATEWAY_PREDICATE_PATH_CONTAINER_ATTR, path); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PathPattern match = null; |
|
|
|
PathPattern match = null; |
|
|
|
for (int i = 0; i < pathPatterns.size(); i++) { |
|
|
|
for (int i = 0; i < pathPatterns.size(); i++) { |
|
|
|