Revert "Merge branch 'fix_null_bearer' into 'develop'"
This reverts commit22c3fa995d
, reversing changes made to3931ba4f81
.
This commit is contained in:
parent
c14fc2fa9d
commit
ad35c7fa72
|
@ -25,12 +25,9 @@ function setCSRFHeader() {
|
|||
|
||||
ready(setCSRFHeader);
|
||||
|
||||
export default getState => {
|
||||
const authToken = getState ? getState().getIn(['meta', 'access_token'], '') : null;
|
||||
|
||||
return axios.create({
|
||||
headers: Object.assign(csrfHeader, authToken ? {
|
||||
'Authorization': `Bearer ${authToken}}`,
|
||||
export default getState => axios.create({
|
||||
headers: Object.assign(csrfHeader, getState ? {
|
||||
'Authorization': `Bearer ${getState().getIn(['meta', 'access_token'], '')}`,
|
||||
} : {}),
|
||||
|
||||
transformResponse: [function (data) {
|
||||
|
@ -41,4 +38,3 @@ export default getState => {
|
|||
}
|
||||
}],
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue