Ajout env pour le proxy
This commit is contained in:
5
.env.local.example
Normal file
5
.env.local.example
Normal file
@@ -0,0 +1,5 @@
|
||||
# renommer le fichier en .env.local pour pouvoir forcer l'url sur un site
|
||||
# PPM preprod :
|
||||
//VITE_GULLIVERSHIP_URL=https://gta-pprod.parapharmacie-et-medicament.com
|
||||
# PPM Prod
|
||||
//VITE_GULLIVERSHIP_URL=https://gta-pprod.parapharmacie-et-medicament.com
|
||||
@@ -89,11 +89,11 @@ const getPdfLinkConverter = (idRdv, idDoc, docFileType) =>{
|
||||
}
|
||||
|
||||
const goToOrder = computed(() => {
|
||||
return "https://gta-pprod.parapharmacie-et-medicament.com/Php/ajax.php?prj="+ store.projectName+ '&do2=goto&page=ORDER&do=Affaire&idbox=11&ID_RDV=' + messages.value[0].id + '&idbusiness='+ storeTicket.idTicket
|
||||
return "/Php/ajax.php?prj="+ store.projectName+ '&do2=goto&page=ORDER&do=Affaire&idbox=11&ID_RDV=' + messages.value[0].id + '&idbusiness='+ storeTicket.idTicket
|
||||
})
|
||||
|
||||
const goToShipment = computed(() => {
|
||||
return "https://gta-pprod.parapharmacie-et-medicament.com/Php/ajax.php?prj="+ store.projectName+ '&do2=goto&page=SHIPMENT&do=Affaire&idbox=11&ID_RDV=' + messages.value[0].id + '&idbusiness='+ storeTicket.idTicket
|
||||
return "/Php/ajax.php?prj="+ store.projectName+ '&do2=goto&page=SHIPMENT&do=Affaire&idbox=11&ID_RDV=' + messages.value[0].id + '&idbusiness='+ storeTicket.idTicket
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
import {fileURLToPath, URL} from "url";
|
||||
import { defineConfig } from 'vite'
|
||||
import { defineConfig, loadEnv } from 'vite';
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
|
||||
const env = loadEnv(
|
||||
'all',
|
||||
process.cwd(),
|
||||
);
|
||||
const mainTarget = (typeof env.VITE_GULLIVERSHIP_URL !== 'undefined')
|
||||
? env.VITE_GULLIVERSHIP_URL
|
||||
: 'https://gta-pprod.parapharmacie-et-medicament.com/'; // par défaut, on va sur la preprod de PPM
|
||||
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
@@ -13,11 +22,15 @@ export default defineConfig({
|
||||
server: {
|
||||
proxy: {
|
||||
'/App': {
|
||||
target: 'https://gta-pprod.parapharmacie-et-medicament.com/',
|
||||
target: mainTarget,
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/interface': {
|
||||
target: 'https://gta-pprod.parapharmacie-et-medicament.com/',
|
||||
target: mainTarget,
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/Php': {
|
||||
target: mainTarget,
|
||||
changeOrigin: true,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user