fix: production detection only triggers on AEGIS_ENV=production, not SECRET_KEY presence
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled

This commit is contained in:
2026-02-20 17:20:48 +01:00
parent 309b3bc02d
commit abef2a45e0
2 changed files with 283 additions and 3 deletions

View File

@@ -7,9 +7,7 @@ from pydantic_settings import BaseSettings
# ---------------------------------------------------------------------------
# Detect environment: "production" when AEGIS_ENV or common indicators are set
# ---------------------------------------------------------------------------
_is_production = os.environ.get("AEGIS_ENV", "").lower() == "production" or bool(
os.environ.get("SECRET_KEY") # having an explicit SECRET_KEY hints prod
)
_is_production = os.environ.get("AEGIS_ENV", "").lower() == "production"
class Settings(BaseSettings):