10 lines
335 B
TypeScript
10 lines
335 B
TypeScript
export function getApiBaseUrl(): string {
|
|
if (import.meta.env.VITE_USE_API_PROXY === "false") {
|
|
return import.meta.env.VITE_API_URL ?? "http://localhost:8000";
|
|
}
|
|
if (import.meta.env.DEV || import.meta.env.VITE_USE_API_PROXY === "true") {
|
|
return "";
|
|
}
|
|
return import.meta.env.VITE_API_URL ?? "http://localhost:8000";
|
|
}
|