云端地址
Tests / Test passed: 545

This commit is contained in:
2026-07-13 16:41:30 +08:00
parent 8f74eac50c
commit 035b177128
2 changed files with 4 additions and 29 deletions
+4 -1
View File
@@ -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";