fix: 修复 Docker 部署 API 地址与数据库连接问题
This commit is contained in:
@@ -39,9 +39,11 @@ function readStoredApiBaseUrl() {
|
||||
return resolveBrowserReachableApiBaseUrl(window.localStorage.getItem(API_BASE_STORAGE_KEY) || '')
|
||||
}
|
||||
|
||||
let runtimeApiBaseUrl = resolveBrowserReachableApiBaseUrl(
|
||||
readStoredApiBaseUrl() || import.meta.env.VITE_API_BASE_URL || '/api/v1'
|
||||
)
|
||||
let runtimeApiBaseUrl = normalizeApiBaseUrl('/api/v1')
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window.localStorage.removeItem(API_BASE_STORAGE_KEY)
|
||||
}
|
||||
|
||||
export function setRuntimeApiBaseUrl(value) {
|
||||
runtimeApiBaseUrl = resolveBrowserReachableApiBaseUrl(value)
|
||||
|
||||
Reference in New Issue
Block a user