From 6a70ebb2a24cb5fca3fe0b4bec294bb95db07ab1 Mon Sep 17 00:00:00 2001 From: idittrich-valueon Date: Mon, 16 Jun 2025 09:51:32 +0200 Subject: [PATCH] updated environment file --- .env | 3 +-- .env.production | 7 +++++++ .gitignore | 5 +++++ src/api.ts | 3 +-- 4 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 .env.production diff --git a/.env b/.env index 3d34738..d5b5a6c 100644 --- a/.env +++ b/.env @@ -1,5 +1,4 @@ -VITE_API_URL="https://gateway.poweron-center.net" -#VITE_API_URL="http://127.0.0.1:8000" +VITE_API_URL="http://127.0.0.1:8000" VITE_MICROSOFT_CLIENT_ID="24cd6c8a-b592-4905-a5ba-d5fa9f911154" VITE_MICROSOFT_TENANT_ID="6a51aaeb-2467-4186-9504-2a05aedc591f" VITE_ENTRA_CLIENT_SECRET="2iw8Q~jwqG1iacxHopBt5pstu6R45UC1gIQabcbD" diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..96d54dc --- /dev/null +++ b/.env.production @@ -0,0 +1,7 @@ +VITE_API_URL="https://gateway-int.poweron-center.net" +VITE_MICROSOFT_CLIENT_ID="24cd6c8a-b592-4905-a5ba-d5fa9f911154" +VITE_MICROSOFT_TENANT_ID="6a51aaeb-2467-4186-9504-2a05aedc591f" +VITE_ENTRA_CLIENT_SECRET="2iw8Q~jwqG1iacxHopBt5pstu6R45UC1gIQabcbD" +VITE_ENTRA_AUTHORITY="https://login.microsoftonline.com/6a51aaeb-2467-4186-9504-2a05aedc591f" +VITE_ENTRA_REDIRECT_PATH="/auth/callback/" +VITE_ENTRA_REDIRECT_URI="https://gateway.poweron-center.net/api/msft/auth/callback/" diff --git a/.gitignore b/.gitignore index a547bf3..5cbc969 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,8 @@ dist-ssr *.njsproj *.sln *.sw? + +# Environment files +.env +.env.local +.env.*.local \ No newline at end of file diff --git a/src/api.ts b/src/api.ts index 6fda148..79eb618 100644 --- a/src/api.ts +++ b/src/api.ts @@ -2,8 +2,7 @@ import axios from 'axios'; const api = axios.create({ - baseURL: 'https://gateway-int.poweron-center.net', - //baseURL: 'http://localhost:8000', + baseURL: import.meta.env.VITE_API_BASE_URL, withCredentials: true });