import axios from 'axios';

axios.defaults.headers.common['Access-Control-Allow-Origin'] = '*';

export function setDefaults(params) {
  axios.defaults.headers.common.Authorization = params.Authorization;
}

export function setAuthorization(Authorization) {
  axios.defaults.headers.common.Authorization = Authorization;
}

export default axios.create({
  baseURL: 'https://api.cfa.darkou.fr/api/',
});
