|
@@ -3,7 +3,6 @@ package com.sxtvs.open.core.conf;
|
|
|
import com.sxtvs.open.core.auth.LoginInterceptor;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
-import org.springframework.web.cors.CorsConfiguration;
|
|
|
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
|
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
@@ -13,12 +12,9 @@ public class WebConfig implements WebMvcConfigurer {
|
|
|
@Override
|
|
|
public void addCorsMappings(CorsRegistry registry) {
|
|
|
registry.addMapping("/**")
|
|
|
- .allowedOriginPatterns("*", "http://www.cnwest.com", "http://www.sxtvs.com")
|
|
|
- .allowedMethods(CorsConfiguration.ALL)
|
|
|
- .allowCredentials(true)
|
|
|
- .maxAge(3600)
|
|
|
- .allowedHeaders(CorsConfiguration.ALL)
|
|
|
- ;
|
|
|
+ .allowedMethods("*")
|
|
|
+ .allowedOrigins("*")
|
|
|
+ .allowedHeaders("*");
|
|
|
}
|
|
|
|
|
|
@Override
|