@Bean public CorsWebFilter corsWebFilter(){ System.out.println("enter...."); org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); CorsConfiguration corsConfiguration = new CorsConfiguration(); //1、配置跨域 corsConfiguration.addAllowedHeader("*"); corsConfiguration.addAllowedMethod("*"); corsConfiguration.addAllowedOrigin("*"); corsConfiguration.setAllowCredentials(true); source.registerCorsConfiguration("/**",corsConfiguration); renvoie un nouveau CorsWebFilter(source); }
configuration de la passerelle api du microservice spring-cloud-gateway entre domaines
Je suppose que tu aimes
Origine blog.csdn.net/qq_20314141/article/details/129845554
conseillé
Classement