我遇到了同样的问题,并通过使用该
withCredentials属性进行了修复。
来自其他域的XMLHttpRequest不能为自己的域设置cookie值,除非在发出请求之前将withCredentials设置为true。
axios.get('some api url', {withCredentials: true});
我遇到了同样的问题,并通过使用该
withCredentials属性进行了修复。
来自其他域的XMLHttpRequest不能为自己的域设置cookie值,除非在发出请求之前将withCredentials设置为true。
axios.get('some api url', {withCredentials: true});