后端设置了header('Access-Control-Allow-Origin: http://10.0.23.16:8088')
返回依然是Access-Control-Allow-Origin: *
碰到cookie跨域问题,设置如下
header('Access-Control-Allow-Headers: Origin. X-Requested-With, Content-Type, Accept, withCredentials');
header('Access-Control-Allow-Methods: GET, POST');
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Allow-Origin: http://10.0.23.16:8088');
//http://10.0.23.16:8088是前端网址
前端用的axios
axios.defaults.withCredentials = true;
但是这样并没有成功,浏览器报错
求各位帮助
这里是响应和请求头
晕,apache服务器没有开启cors,但是设置了居然自带了一项设置
改掉就好了