Add test UI toggle and docs
This commit is contained in:
@@ -6,9 +6,17 @@ from dotenv import load_dotenv
|
||||
load_dotenv()
|
||||
|
||||
|
||||
def _env_bool(name: str, default: bool = False) -> bool:
|
||||
value = os.getenv(name)
|
||||
if value is None:
|
||||
return default
|
||||
return value.strip().lower() in {"1", "true", "yes", "on"}
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class Settings:
|
||||
env: str = os.getenv("ENV", "prod").strip().lower()
|
||||
test_ui_enabled: bool = _env_bool("FACE_LOCK_TEST_UI", True)
|
||||
auth_token: str = os.getenv("FACE_LOCK_AUTH_TOKEN", "").strip()
|
||||
auth_header_name: str = os.getenv("FACE_LOCK_AUTH_HEADER", "X-API-Key").strip()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user