Explorar o código

fix(cors): 允许 cfc.iwintrue.com 访问后端 API

iwt hai 1 mes
pai
achega
5048775065

+ 1 - 1
cfc-backend/src/main/java/com/etotem/cfc/config/WebConfig.java

@@ -44,7 +44,7 @@ public class WebConfig implements WebMvcConfigurer {
     @Override
     @Override
     public void addCorsMappings(CorsRegistry registry) {
     public void addCorsMappings(CorsRegistry registry) {
         registry.addMapping("/**")
         registry.addMapping("/**")
-                .allowedOriginPatterns("https://cfc.etotem.com.cn", "http://cfc.etotem.com.cn", "https://www.etotem.com.cn", "http://www.etotem.com.cn", "https://cf-club.iwintrue.com", "http://cf-club.iwintrue.com", "https://www.cf-club.com", "http://www.cf-club.com", "https://cfc.cf-club.com", "http://cfc.cf-club.com", "https://111.228.6.214", "http://111.228.6.214", "http://localhost:*", "http://127.0.0.1:*")
+                .allowedOriginPatterns("https://cfc.etotem.com.cn", "http://cfc.etotem.com.cn", "https://www.etotem.com.cn", "http://www.etotem.com.cn", "https://cf-club.iwintrue.com", "http://cf-club.iwintrue.com", "https://cfc.iwintrue.com", "http://cfc.iwintrue.com", "https://www.cf-club.com", "http://www.cf-club.com", "https://cfc.cf-club.com", "http://cfc.cf-club.com", "https://111.228.6.214", "http://111.228.6.214", "http://localhost:*", "http://127.0.0.1:*")
                 .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
                 .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
                 .allowedHeaders("*")
                 .allowedHeaders("*")
                 .allowCredentials(true)
                 .allowCredentials(true)