Merge branch 'optimization/route' into feature/flow
This commit is contained in:
@@ -114,16 +114,20 @@ public class PreFilter extends ProxyAggrFilter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void afterAuth(ServerWebExchange exchange, ApiConfig ac) {
|
private void afterAuth(ServerWebExchange exchange, ApiConfig ac) {
|
||||||
String bs, bp;
|
String bs = null, bp = null;
|
||||||
if (ac == null) {
|
if (ac == null) {
|
||||||
bs = WebUtils.getClientService(exchange);
|
bs = WebUtils.getClientService(exchange);
|
||||||
bp = WebUtils.getClientReqPath(exchange);
|
bp = WebUtils.getClientReqPath(exchange);
|
||||||
} else {
|
} else {
|
||||||
bs = ac.backendService;
|
if (ac.type != ApiConfig.Type.REVERSE_PROXY) {
|
||||||
bp = ac.transform(WebUtils.getClientReqPath(exchange));
|
bs = ac.backendService;
|
||||||
|
bp = ac.transform(WebUtils.getClientReqPath(exchange));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (bs != null) {
|
||||||
|
WebUtils.setBackendService(exchange, bs);
|
||||||
|
WebUtils.setBackendPath(exchange, bp);
|
||||||
}
|
}
|
||||||
WebUtils.setBackendService(exchange, bs);
|
|
||||||
WebUtils.setBackendPath(exchange, bp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Mono chain(ServerWebExchange exchange, Mono m, PluginFilter pf) {
|
private Mono chain(ServerWebExchange exchange, Mono m, PluginFilter pf) {
|
||||||
|
|||||||
Reference in New Issue
Block a user