大屏页面初始化
This commit is contained in:
@@ -9,16 +9,11 @@ public class CorsConfig implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
// 允许所有路径跨域
|
||||
registry.addMapping("/**")
|
||||
.allowedOriginPatterns("*")
|
||||
// 允许的请求方法
|
||||
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
|
||||
// 允许的请求头
|
||||
.allowedHeaders("*")
|
||||
// 允许携带Cookie
|
||||
.allowCredentials(true)
|
||||
// 预检请求有效期(秒)
|
||||
.maxAge(3600);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user