mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-31 02:57:57 +00:00 
			
		
		
		
	 16fe912fbd
			
		
	
	16fe912fbd
	
	
	
		
			
			Co-authored-by: Nithin David Thomas <webofnithin@gmail.com> Co-authored-by: Sojan Jose <sojan@pepalo.com>
		
			
				
	
	
		
			16 lines
		
	
	
		
			349 B
		
	
	
	
		
			JavaScript
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			349 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 = (key, value) => {
 | |
|   API.defaults.headers.common[key] = value;
 | |
| };
 | |
| 
 | |
| export const removeHeader = key => {
 | |
|   delete API.defaults.headers.common[key];
 | |
| };
 |