mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-03 04:27:53 +00:00
[Bug] Fix unable to set unsafe-headers
This commit is contained in:
@@ -18,7 +18,20 @@ export default axios => {
|
|||||||
wootApi.defaults.baseURL = constants.apiURL;
|
wootApi.defaults.baseURL = constants.apiURL;
|
||||||
// Add Auth Headers to requests if logged in
|
// Add Auth Headers to requests if logged in
|
||||||
if (Auth.isLoggedIn()) {
|
if (Auth.isLoggedIn()) {
|
||||||
Object.assign(wootApi.defaults.headers.common, Auth.getAuthData());
|
const {
|
||||||
|
'access-token': accessToken,
|
||||||
|
'token-type': tokenType,
|
||||||
|
client,
|
||||||
|
expiry,
|
||||||
|
uid,
|
||||||
|
} = Auth.getAuthData();
|
||||||
|
Object.assign(wootApi.defaults.headers.common, {
|
||||||
|
'access-token': accessToken,
|
||||||
|
'token-type': tokenType,
|
||||||
|
client,
|
||||||
|
expiry,
|
||||||
|
uid,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
// Response parsing interceptor
|
// Response parsing interceptor
|
||||||
wootApi.interceptors.response.use(
|
wootApi.interceptors.response.use(
|
||||||
|
|||||||
Reference in New Issue
Block a user