mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-03 20:48:07 +00:00 
			
		
		
		
	- Discard conflicting keys - Do not merge if there is already an identified contact Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
		
			
				
	
	
		
			16 lines
		
	
	
		
			366 B
		
	
	
	
		
			JavaScript
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			16 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];
 | 
						|
};
 |