fixed https for prod api

This commit is contained in:
2022-11-02 21:53:27 +01:00
parent 83fe5e48fd
commit 86d7cf8a10
+8 -1
View File
@@ -42,7 +42,14 @@ Vue.use(VueClipboard)
Vue.use(VueSweetalert2)
// https://apple.stackexchange.com/questions/17077/add-a-hosts-file-entry-without-jailbreaking
window.apipath = process.env === 'prod' || window.location.hostname === 'dev.gdp.fr' ? `http://${window.location.hostname}/api` : 'http://localhost:8984'
// window.apipath = process.env === 'prod' || window.location.hostname === 'dev.gdp.fr' ? `http://${window.location.hostname}/api` : 'http://localhost:8984'
if (process.env === 'prod') {
window.apipath = `https://api.guidesdeparis.fr`
} else if (window.location.hostname === 'dev.gdp.fr') {
window.apipath = `http://${window.location.hostname}/api`
} else {
window.apipath = 'http://localhost:8984'
}
// if (window.location.hostname === 'dev.gdp.fr') {
// window.apipath = `http://${window.location.hostname}/api`
// }