mirror of https://github.com/macrozheng/mall
跨域问题解决
parent
7a3da238c1
commit
d59951511a
|
@ -20,7 +20,7 @@ public class GlobalCorsConfig {
|
|||
public CorsFilter corsFilter() {
|
||||
CorsConfiguration config = new CorsConfiguration();
|
||||
//允许所有域名进行跨域调用
|
||||
config.addAllowedOrigin("*");
|
||||
config.addAllowedOriginPattern("*");
|
||||
//允许跨越发送cookie
|
||||
config.setAllowCredentials(true);
|
||||
//放行全部原始头信息
|
||||
|
|
|
@ -20,7 +20,7 @@ public class GlobalCorsConfig {
|
|||
public CorsFilter corsFilter() {
|
||||
CorsConfiguration config = new CorsConfiguration();
|
||||
//允许所有域名进行跨域调用
|
||||
config.addAllowedOrigin("*");
|
||||
config.addAllowedOriginPattern("*");
|
||||
//允许跨越发送cookie
|
||||
config.setAllowCredentials(true);
|
||||
//放行全部原始头信息
|
||||
|
|
Loading…
Reference in New Issue