fixed axios baseurl
This commit is contained in:
@ -3,9 +3,10 @@ import axios from 'axios'
|
||||
// https://github.com/alvar0hurtad0/drupal-vuejs-todo/blob/master/frontend/src/api/axiosInterceptor.js
|
||||
|
||||
// console.log('drupalSettings', drupalSettings);
|
||||
console.log(window.location);
|
||||
|
||||
export const JSONAPI = axios.create({
|
||||
baseURL: `http://dev.materio.com/jsonapi`,
|
||||
baseURL: window.location.origin+`/jsonapi`,
|
||||
headers: {
|
||||
Accept: 'application/vnd.api+json'
|
||||
// Authorization: 'Bearer {token}',
|
||||
|
@ -5,7 +5,7 @@ import axios from 'axios'
|
||||
// console.log('drupalSettings', drupalSettings);
|
||||
|
||||
export const REST = axios.create({
|
||||
baseURL: `http://dev.materio.com`,
|
||||
baseURL: window.location.origin,
|
||||
headers: {
|
||||
Authorization: 'Bearer {token}',
|
||||
"Content-Type": "application/json"
|
||||
|
Reference in New Issue
Block a user