web/env: accept 1 as bool value

This commit is contained in:
wukko 2025-06-28 16:59:00 +06:00
parent 3d2473d8ef
commit bc8c16f469
No known key found for this signature in database
GPG Key ID: 3E30B3F26C7B4AA2

View File

@ -10,7 +10,8 @@ const getEnv = (_key: string) => {
} }
const getEnvBool = (key: string) => { const getEnvBool = (key: string) => {
return getEnv(key) === "true"; const value = getEnv(key);
return value && ['1', 'true'].includes(value.toLowerCase());
} }
const variables = { const variables = {