This commit is contained in:
hailin 2025-06-25 13:54:21 +08:00
parent cd2c561547
commit 9fe82233f7
1 changed files with 0 additions and 33 deletions

View File

@ -6,39 +6,6 @@
// return process.env[key];
// }
// let _env: Record<string, string> | null = null
// export function getRuntimeEnv(key: string): string | undefined {
// console.log("============>>Getting Supabase API URL.")
// if (typeof window !== "undefined") {
// if (!_env && typeof window.RUNTIME_ENV !== "undefined") {
// _env = window.RUNTIME_ENV
// console.log("[browser-side] Retrieved API endpoint from window.RUNTIME_ENV:", _env);
// }
// if (_env) {
// console.log("[browser-side]Returning cached API from _env:", _env)
// return _env[key]
// }
// console.log("[browser-side]No window.RUNTIME_ENV found in browser")
// return undefined
// }
// // 服务端始终动态读取 process.env
// const val = process.env[key]
// console.log("[server-side] Falling back to process.env for key:", key, "value:", val)
// return val
// }
let _env: Record<string, string> | null = null
// 最大重试次数