This commit is contained in:
parent
06e98a363e
commit
0dcc3389d7
|
@ -9,7 +9,7 @@ public class WebLoginConfig implements WebMvcConfigurer {
|
|||
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**") // 对所有路径应用此规则
|
||||
registry.addMapping("/") // 对所有路径应用此规则
|
||||
.allowedOrigins("http://localhost:3000") // 允许来自这个源的请求
|
||||
.allowedMethods("GET", "POST", "PUT", "DELETE") // 允许的HTTP方法
|
||||
.allowedHeaders("*") // 允许的请求头
|
||||
|
|
Loading…
Reference in New Issue