Commit 18fb1406 by ljb

解决DELETE请求跨域问题

parent 8df8cd01
...@@ -22,7 +22,7 @@ public class ResourcesConfiguration implements WebMvcConfigurer{ ...@@ -22,7 +22,7 @@ public class ResourcesConfiguration implements WebMvcConfigurer{
public void addCorsMappings(CorsRegistry registry) { public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**") registry.addMapping("/**")
.allowedOrigins("*") .allowedOrigins("*")
.allowedMethods("GET","POST","OPTIONS") .allowedMethods("GET","POST","OPTIONS", "DELETE")
.allowCredentials(true); .allowCredentials(true);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment