check service id before matching aggregation api

This commit is contained in:
Francis Dong
2020-11-24 15:59:14 +08:00
committed by dxfeng10
parent f89e4df27d
commit 336c13f86c

View File

@@ -74,6 +74,10 @@ public class FizzGatewayFilter implements WebFilter {
ServerHttpRequest request = exchange.getRequest();
ServerHttpResponse serverHttpResponse = exchange.getResponse();
if (WebUtils.getServiceId(exchange) == null) {
return chain.filter(exchange);
}
String path = WebUtils.getPathPrefix(exchange) + WebUtils.getServiceId(exchange) + WebUtils.getReqPath(exchange);
String method = request.getMethodValue();
AggregateResource aggregateResource = configLoader.matchAggregateResource(method, path);