diff --git a/src/api/rest-axios.js b/src/api/rest-axios.js index 46c9f6c..d70fbf1 100644 --- a/src/api/rest-axios.js +++ b/src/api/rest-axios.js @@ -16,7 +16,7 @@ import axios from 'axios' // let path = 'http://' + window.location.hostname + (window.env === 'prod' ? '/api' : ':8984') export const REST = axios.create({ - baseURL: 'http://' + window.location.hostname, + // baseURL: 'http://', // withCredentials: true, crossorigin: true, headers: { diff --git a/src/index.js b/src/index.js index 7ff70a9..723e0b8 100644 --- a/src/index.js +++ b/src/index.js @@ -31,7 +31,8 @@ Vue.use(InfiniteLoading, { Vue.use(VueScrollTo) // window.env = process.env -window.apipath = process.env === 'prod' ? '/api' : ':8984' + +window.apipath = process.env === 'prod' ? `http://${window.location.hostname}/api` : 'http://localhost:8984' // sync(store, router) // done. Returns an unsync callback fn