Skip to content

Commit 6a470ae

Browse files
committed
fix #I1HRK2
1 parent b26c60e commit 6a470ae

File tree

1 file changed

+3
-0
lines changed
  • zlt-gateway/sc-gateway/src/main/java/com/central/gateway/config

1 file changed

+3
-0
lines changed

zlt-gateway/sc-gateway/src/main/java/com/central/gateway/config/CorsConfig.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import org.springframework.context.annotation.Bean;
44
import org.springframework.context.annotation.Configuration;
5+
import org.springframework.core.Ordered;
6+
import org.springframework.core.annotation.Order;
57
import org.springframework.web.cors.CorsConfiguration;
68
import org.springframework.web.cors.reactive.CorsWebFilter;
79
import org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource;
@@ -20,6 +22,7 @@
2022
public class CorsConfig {
2123
private static final String ALL = "*";
2224

25+
@Order(Ordered.HIGHEST_PRECEDENCE)
2326
@Bean
2427
public CorsWebFilter corsFilter() {
2528
CorsConfiguration config = new CorsConfiguration();

0 commit comments

Comments
 (0)