添加 cors 策略 允许跨域
This commit is contained in:
parent
3ea5ac5deb
commit
44470dddb7
@ -24,7 +24,7 @@ public class WebConfig implements WebMvcConfigurer {
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry corsRegistry){
|
||||
corsRegistry.addMapping("/**")
|
||||
.allowedOrigins("*")
|
||||
.allowedOriginPatterns("*")
|
||||
.allowCredentials(true)
|
||||
.allowedMethods("GET","POST","HEAD","DELETE","PUT")
|
||||
.allowedHeaders("*")
|
||||
|
Loading…
Reference in New Issue
Block a user