mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
4.0.3
This commit is contained in:
@@ -5,6 +5,7 @@ import com.gitee.sop.gatewaycommon.bean.SopConstants;
|
||||
import com.gitee.sop.gatewaycommon.exception.ApiException;
|
||||
import com.gitee.sop.gatewaycommon.gateway.ServerWebExchangeUtil;
|
||||
import com.gitee.sop.gatewaycommon.gateway.route.GatewayForwardChooser;
|
||||
import com.gitee.sop.gatewaycommon.manager.EnvironmentKeys;
|
||||
import com.gitee.sop.gatewaycommon.param.ApiParam;
|
||||
import com.gitee.sop.gatewaycommon.route.ForwardInfo;
|
||||
import com.gitee.sop.gatewaycommon.util.RouteInterceptorUtil;
|
||||
@@ -44,8 +45,6 @@ import java.util.Objects;
|
||||
@Order(Ordered.HIGHEST_PRECEDENCE)
|
||||
public class IndexFilter implements WebFilter {
|
||||
|
||||
private static final String REST_PATH_PREFIX = "/rest";
|
||||
|
||||
/** 路径白名单 */
|
||||
private static final List<String> PATH_WHITE_LIST = Arrays.asList(
|
||||
"/sop", "/actuator"
|
||||
@@ -69,7 +68,7 @@ public class IndexFilter implements WebFilter {
|
||||
return chain.filter(exchange);
|
||||
}
|
||||
// 如果是restful请求,直接转发
|
||||
if (path.startsWith(REST_PATH_PREFIX)) {
|
||||
if (path.startsWith(EnvironmentKeys.SOP_RESTFUL_PATH.getValue())) {
|
||||
exchange.getAttributes().put(SopConstants.RESTFUL_REQUEST, true);
|
||||
String restfulPath = ServerWebExchangeUtil.getRestfulPath(path);
|
||||
ServerWebExchange newExchange = ServerWebExchangeUtil.getForwardExchange(exchange, restfulPath);
|
||||
|
Reference in New Issue
Block a user