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
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user