|
@@ -35,8 +35,8 @@ public class WebConfigurer extends WebMvcConfigurationSupport {
|
|
@Override
|
|
@Override
|
|
public void addCorsMappings(CorsRegistry registry) {
|
|
public void addCorsMappings(CorsRegistry registry) {
|
|
log.warn("开启跨域支持");
|
|
log.warn("开启跨域支持");
|
|
- registry.addMapping("/**").allowedOrigins("*").allowedMethods("POST", "GET", "PUT", "OPTIONS", "DELETE")
|
|
|
|
- .maxAge(3600).allowCredentials(true);
|
|
|
|
|
|
+ registry.addMapping("/**").allowedOrigins("*").allowedHeaders("*")
|
|
|
|
+ .allowedMethods("POST", "GET", "PUT", "OPTIONS", "DELETE").maxAge(3600).allowCredentials(true);
|
|
super.addCorsMappings(registry);
|
|
super.addCorsMappings(registry);
|
|
}
|
|
}
|
|
}
|
|
}
|