fix #I1HRK2
This commit is contained in:
@@ -2,6 +2,8 @@ package com.central.gateway.config;
|
|||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.core.Ordered;
|
||||||
|
import org.springframework.core.annotation.Order;
|
||||||
import org.springframework.web.cors.CorsConfiguration;
|
import org.springframework.web.cors.CorsConfiguration;
|
||||||
import org.springframework.web.cors.reactive.CorsWebFilter;
|
import org.springframework.web.cors.reactive.CorsWebFilter;
|
||||||
import org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource;
|
import org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource;
|
||||||
@@ -20,6 +22,7 @@ import org.springframework.web.util.pattern.PathPatternParser;
|
|||||||
public class CorsConfig {
|
public class CorsConfig {
|
||||||
private static final String ALL = "*";
|
private static final String ALL = "*";
|
||||||
|
|
||||||
|
@Order(Ordered.HIGHEST_PRECEDENCE)
|
||||||
@Bean
|
@Bean
|
||||||
public CorsWebFilter corsFilter() {
|
public CorsWebFilter corsFilter() {
|
||||||
CorsConfiguration config = new CorsConfiguration();
|
CorsConfiguration config = new CorsConfiguration();
|
||||||
|
|||||||
Reference in New Issue
Block a user