2020-12-10 22:46:27 +01:00
|
|
|
import axios from 'axios'
|
|
|
|
|
|
|
|
// https://github.com/alvar0hurtad0/drupal-vuejs-todo/blob/master/frontend/src/api/axiosInterceptor.js
|
|
|
|
|
2021-03-31 18:42:05 +02:00
|
|
|
// console.log('drupalSettings', drupalSettings)
|
|
|
|
console.log(window.location)
|
2020-12-10 22:46:27 +01:00
|
|
|
|
|
|
|
export const MGQ = axios.create({
|
2021-03-31 18:42:05 +02:00
|
|
|
baseURL: window.location.origin + '/mgq',
|
2020-12-10 22:46:27 +01:00
|
|
|
withCredentials: true,
|
|
|
|
headers: {
|
2021-03-31 18:42:05 +02:00
|
|
|
Accept: 'application/json',
|
2020-12-10 22:46:27 +01:00
|
|
|
// Accept: 'application/vnd.api+json'
|
|
|
|
// Authorization: 'Basic {token}',
|
2021-03-31 18:42:05 +02:00
|
|
|
'Content-Type': 'application/json'
|
2020-12-10 22:46:27 +01:00
|
|
|
}
|
|
|
|
})
|