diff --git a/fund-gateway/src/main/java/com/fundplatform/gateway/filter/TenantGatewayFilter.java b/fund-gateway/src/main/java/com/fundplatform/gateway/filter/TenantGatewayFilter.java index 4091475..c61181c 100644 --- a/fund-gateway/src/main/java/com/fundplatform/gateway/filter/TenantGatewayFilter.java +++ b/fund-gateway/src/main/java/com/fundplatform/gateway/filter/TenantGatewayFilter.java @@ -38,18 +38,19 @@ public class TenantGatewayFilter implements GlobalFilter, Ordered { public static final String HEADER_USERNAME = "X-Username"; // 白名单路径(不需要X-Tenant-Id) + // 注意:路径是网关接收的原始请求路径(含/fund前缀) private static final List TENANT_ID_WHITE_LIST = Arrays.asList( - "/sys/api/v1/auth/login", // 登录接口 - "/sys/api/v1/auth/logout", // 登出接口 - "/actuator/health", // 健康检查 - "/sys/api/v1/sys/health", // 系统服务健康检查 - "/cust/api/v1/cust/health", // 客户服务健康检查 - "/proj/api/v1/proj/health", // 项目服务健康检查 - "/exp/api/v1/exp/health", // 支出服务健康检查 - "/receipt/api/v1/receipt/health", // 收款服务健康检查 - "/report/api/v1/report/health", // 报表服务健康检查 - "/req/api/v1/req/health", // 请求服务健康检查 - "/file/api/v1/file/health" // 文件服务健康检查 + "/fund/sys/auth/login", // 登录接口 + "/fund/sys/auth/logout", // 登出接口 + "/actuator/health", // 网关健康检查(无/fund前缀) + "/fund/sys/health", // 系统服务健康检查 + "/fund/cust/health", // 客户服务健康检查 + "/fund/proj/health", // 项目服务健康检查 + "/fund/exp/health", // 支出服务健康检查 + "/fund/receipt/health", // 收款服务健康检查 + "/fund/report/health", // 报表服务健康检查 + "/fund/req/health", // 请求服务健康检查 + "/fund/file/health" // 文件服务健康检查 ); private final ObjectMapper objectMapper = new ObjectMapper(); diff --git a/fund-gateway/src/main/java/com/fundplatform/gateway/filter/TokenAuthFilter.java b/fund-gateway/src/main/java/com/fundplatform/gateway/filter/TokenAuthFilter.java index a8ea472..79a192f 100644 --- a/fund-gateway/src/main/java/com/fundplatform/gateway/filter/TokenAuthFilter.java +++ b/fund-gateway/src/main/java/com/fundplatform/gateway/filter/TokenAuthFilter.java @@ -39,11 +39,17 @@ public class TokenAuthFilter implements GlobalFilter, Ordered { private static final String TENANT_ID_HEADER = "X-Tenant-Id"; // 白名单路径(不需要token验证) + // 注意:路径是网关接收的原始请求路径(含/fund前缀) private static final List WHITE_LIST = Arrays.asList( - "/sys/api/v1/auth/login", - "/sys/api/v1/sys/health", - "/cust/api/v1/cust/health", - "/proj/api/v1/proj/health" + "/fund/sys/auth/login", + "/fund/sys/health", + "/fund/cust/health", + "/fund/proj/health", + "/fund/exp/health", + "/fund/receipt/health", + "/fund/report/health", + "/fund/req/health", + "/fund/file/health" ); private final ReactiveTokenService reactiveTokenService;