From 918a6c602e5bad3bee142b4d5a36287e41dfc165 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Tue, 14 Jul 2020 22:45:43 +0200 Subject: [PATCH] bugfix --- src/api/rest-axios.js | 2 +- src/index.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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