后台设置 Access-Control-Allow-Origin 为当前域名,比如 http://localhost:8080 、Access-Control-Allow-Credentials 设置为 true;前台设置 defaults.withCredentials = true,即可。
后台设置 Access-Control-Allow-Origin 为当前域名,比如 http://localhost:8080 、Access-Control-Allow-Credentials 设置为 true;前台设置 defaults.withCredentials = true,即可。