Chatwoot/app/javascript/widget/helpers/axios.js
Sojan Jose f71980bd95
chore: Enhance contact merge action for identified users (#4886)
- Discard conflicting keys 
- Do not merge if there is already an identified contact

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-06-23 15:48:56 +05:30

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];
};