Fix production API URL to use window.__ENV__.API_BASE

This commit is contained in:
dvirlabs 2025-12-11 16:08:38 +02:00
parent 080977cdb7
commit 7c6703354e
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
const API_URL = window.ENV?.VITE_API_URL || "http://localhost:8000";
const API_URL = window.__ENV__?.API_BASE || window.ENV?.VITE_API_URL || "http://localhost:8000";
// Get auth token from localStorage
const getAuthHeaders = () => {

View File

@ -1,4 +1,4 @@
const API_BASE_URL = window._env_?.VITE_API_URL || import.meta.env.VITE_API_URL || "http://localhost:8000";
const API_BASE_URL = window.__ENV__?.API_BASE || window._env_?.VITE_API_URL || import.meta.env.VITE_API_URL || "http://localhost:8000";
function getAuthHeaders() {
const token = localStorage.getItem("auth_token");