Browse Source

fix axios env api path

Bachir Soussi Chiadmi 3 years ago
parent
commit
5052e2b60e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/api/rest-axios.js

+ 2 - 2
src/api/rest-axios.js

@@ -13,10 +13,10 @@ import axios from 'axios'
 // let path = 'http://dev.api.gdp.fr'
 // let path = 'http://localhost:8984'
 // const
-let path = 'http://' + window.location.hostname + (window.env === 'prod' ? '/api' : ':8984')
+// let path = 'http://' + window.location.hostname + (window.env === 'prod' ? '/api' : ':8984')
 
 export const REST = axios.create({
-  baseURL: path,
+  baseURL: 'http://' + window.location.hostname + (window.env === 'prod' ? '/api' : ':8984'),
   // withCredentials: true,
   crossorigin: true,
   headers: {