import axios from 'axios'; import { autoRefresh } from '../utils/utils'; export const authInstance = axios.create({ baseURL: `${process.env.API_BASE}`, headers: { 'Content-Type': 'application/json', Accept: 'application/json', 'Access-Control-Allow-Origin': '*', //'X-CSRFToken': csrftoken != undefined ? csrftoken : '', } }); authInstance.interceptors.request.use(autoRefresh, (error) => { Promise.reject(error); });