cors

https://github.com/axios/axios/issues/319

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
const axiosConfig = {
headers: {
'content-Type': 'application/json',
"Accept": "/",
"Cache-Control": "no-cache",
"Cookie": document.cookie
},
credentials: "same-origin"
};
axios.defaults.withCredentials = true;
axios.get('/url',
axiosConfig)
.then((res) => {
// Some result here
})
.catch((err) => {
console.log(':(');
});

WorkingDirectory