From a29c4dccfb1c36c34b6a9d80fb203544f114a47e Mon Sep 17 00:00:00 2001 From: Sergey Krashevich Date: Mon, 19 Jun 2023 11:11:23 +0300 Subject: [PATCH] Allow extra configuration options if FRIGATE_ALLOW_EXTRA is set in environment variables --- frigate/config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frigate/config.py b/frigate/config.py index 2d9bb102a..f00936533 100644 --- a/frigate/config.py +++ b/frigate/config.py @@ -45,7 +45,11 @@ DEFAULT_DETECTORS = {"cpu": {"type": "cpu"}} class FrigateBaseModel(BaseModel): class Config: - extra = Extra.forbid + extra = ( + Extra.allow + if os.environ.get("FRIGATE_ALLOW_EXTRA") is not None + else Extra.forbid + ) class LiveModeEnum(str, Enum):