Fix production API URL to use window.__ENV__.API_BASE
This commit is contained in:
parent
080977cdb7
commit
7c6703354e
@ -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
|
// Get auth token from localStorage
|
||||||
const getAuthHeaders = () => {
|
const getAuthHeaders = () => {
|
||||||
|
|||||||
@ -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() {
|
function getAuthHeaders() {
|
||||||
const token = localStorage.getItem("auth_token");
|
const token = localStorage.getItem("auth_token");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user