@@ -11,8 +11,11 @@ import type {
|
||||
const configuredBaseUrl = import.meta.env.VITE_CLOUD_API_BASE_URL as
|
||||
| string
|
||||
| undefined;
|
||||
// Same-origin Docker deployments (CLOUD_CONSOLE_STATIC_DIR) serve this SPA
|
||||
// straight off the Cloud API, so without a build-time override the API lives
|
||||
// at whatever host the browser loaded the page from, not a hardcoded IP.
|
||||
export const API_BASE_URL = (
|
||||
configuredBaseUrl || "http://127.0.0.1:8001"
|
||||
configuredBaseUrl || window.location.origin
|
||||
).replace(/\/$/, "");
|
||||
|
||||
const TOKEN_STORAGE_KEY = "cloudConsole.bearerToken";
|
||||
|
||||
Reference in New Issue
Block a user