f71980bd95
- Discard conflicting keys - Do not merge if there is already an identified contact Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
15 lines
366 B
JavaScript
Executable file
15 lines
366 B
JavaScript
Executable file
import axios from 'axios';
|
|
import { APP_BASE_URL } from 'widget/helpers/constants';
|
|
|
|
export const API = axios.create({
|
|
baseURL: APP_BASE_URL,
|
|
withCredentials: false,
|
|
});
|
|
|
|
export const setHeader = (value, key = 'X-Auth-Token') => {
|
|
API.defaults.headers.common[key] = value;
|
|
};
|
|
|
|
export const removeHeader = key => {
|
|
delete API.defaults.headers.common[key];
|
|
};
|