ma-axios.js 408 B

1234567891011121314
  1. import axios from 'axios'
  2. // https://github.com/alvar0hurtad0/drupal-vuejs-todo/blob/master/frontend/src/api/axiosInterceptor.js
  3. // console.log('drupalSettings', drupalSettings)
  4. export const MA = axios.create({
  5. baseURL: window.location.origin + '/' + drupalSettings.path.pathPrefix,
  6. withCredentials: true,
  7. headers: {
  8. 'Content-Type': 'application/json'
  9. // "X-CSRF-Token": "csrf_token"
  10. }
  11. })