Showing
1 changed file
with
1 additions
and
1 deletions
| ... | @@ -68,7 +68,7 @@ public class WebMvcConfig implements WebMvcConfigurer { | ... | @@ -68,7 +68,7 @@ public class WebMvcConfig implements WebMvcConfigurer { |
| 68 | public void addCorsMappings(CorsRegistry registry) { | 68 | public void addCorsMappings(CorsRegistry registry) { |
| 69 | // 跨域支持 | 69 | // 跨域支持 |
| 70 | registry.addMapping("/**") | 70 | registry.addMapping("/**") |
| 71 | - .allowedOrigins("*") | 71 | + .allowedOriginPatterns("*") |
| 72 | .allowedMethods(HttpMethod.GET.name(), HttpMethod.POST.name(), HttpMethod.PUT.name(), HttpMethod.DELETE.name(), HttpMethod.PATCH.name(), HttpMethod.OPTIONS.name()) | 72 | .allowedMethods(HttpMethod.GET.name(), HttpMethod.POST.name(), HttpMethod.PUT.name(), HttpMethod.DELETE.name(), HttpMethod.PATCH.name(), HttpMethod.OPTIONS.name()) |
| 73 | .allowCredentials(true); | 73 | .allowCredentials(true); |
| 74 | } | 74 | } | ... | ... |
-
Please register or login to post a comment