From 44f55063757032dc246f091802651de2310b12a4 Mon Sep 17 00:00:00 2001 From: tanghc Date: Tue, 26 May 2020 10:04:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B7=A8=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sop/gatewaycommon/manager/AbstractConfiguration.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/AbstractConfiguration.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/AbstractConfiguration.java index 3a784093..41432203 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/AbstractConfiguration.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/AbstractConfiguration.java @@ -197,12 +197,12 @@ public class AbstractConfiguration implements ApplicationContextAware, Applicati } /** - * 跨域过滤器,gateway + * 跨域过滤器,gateway采用react形式,需要使用reactive包下的UrlBasedCorsConfigurationSource */ @Bean @ConditionalOnMissingBean @ConditionalOnProperty("sop.gateway-index-path") - public CorsWebFilter corsFilterReact() { + public CorsWebFilter corsWebFilter() { org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource source = new org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource(); source.registerCorsConfiguration("/**", createCorsConfiguration()); return new CorsWebFilter(source);