添加 TODO,不放行全部域名,通过配置文件配置允许访问的域名。
parent
3b1c15335b
commit
e8274b1beb
|
@ -12,6 +12,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
@Configuration
|
@Configuration
|
||||||
public class WebCorsConfig implements WebMvcConfigurer {
|
public class WebCorsConfig implements WebMvcConfigurer {
|
||||||
|
|
||||||
|
// TODO 不放行全部,通过配置文件配置允许访问的域名
|
||||||
@Override
|
@Override
|
||||||
public void addCorsMappings(CorsRegistry registry) {
|
public void addCorsMappings(CorsRegistry registry) {
|
||||||
registry.addMapping("/**")
|
registry.addMapping("/**")
|
||||||
|
|
Loading…
Reference in New Issue