This commit is contained in:
parent
cd2c561547
commit
64a671fa47
|
|
@ -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
|
||||
|
||||
// 最大重试次数
|
||||
|
|
|
|||
Loading…
Reference in New Issue