This commit is contained in:
Andrew Pennington 2024-08-15 23:42:34 +01:00
parent 631a5e3e31
commit 9afdecb76c
No known key found for this signature in database
GPG key ID: E9DA097213FD17EA

View file

@ -23,7 +23,7 @@ async function fetchConfig() {
}
}
export async function await getServerEnv(envVar: string): Promise<string> {
export async function getServerEnv(envVar: string): Promise<string> {
// Check if the cache is still valid
if (cachedConfig && cacheTimestamp && Date.now() - cacheTimestamp < CACHE_DURATION_MS) {
return cachedConfig[envVar] || process.env[envVar];