Commit 96d89c11 authored by 张烨's avatar 张烨

fix: api authoriztion

parent eb97d4b1
......@@ -24,11 +24,11 @@ const getMatchedConfig = requestConfig => {
return null;
}
};
axios.defaults.withCredentials = false
axios.defaults.withCredentials = true
axios.interceptors.request.use( function (request){
const token = localStorage.getItem('token')
if(token){
request.headers.token = token
request.headers.Authorization = 'Bearer ' + token
}
return request
}, function (error) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment