mirror of https://github.com/halo-dev/halo
Update MvcConfig.java
parent
2ac0dda82b
commit
a466d00506
|
@ -99,10 +99,15 @@ public class MvcConfig implements WebMvcConfigurer {
|
|||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/api/**")
|
||||
.allowCredentials(true)
|
||||
.allowedHeaders("*")
|
||||
.allowedOrigins("*")
|
||||
.allowedMethods("*");
|
||||
.allowedMethods("GET", "POST")
|
||||
.exposedHeaders("access-control-allow-headers",
|
||||
"access-control-allow-methods",
|
||||
"access-control-allow-origin",
|
||||
"access-control-max-age",
|
||||
"X-Frame-Options")
|
||||
.allowCredentials(false).maxAge(3600);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue