From 3f6393a943017234f6bb84a1d1d09a04dc707abd Mon Sep 17 00:00:00 2001 From: Tiago vasconcelos Date: Mon, 5 Jul 2021 10:02:36 +0100 Subject: [PATCH] Small fix to disable all extensions --- .env.example | 1 + lnbits/helpers.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.env.example b/.env.example index 6ca9a281..1994ab1d 100644 --- a/.env.example +++ b/.env.example @@ -17,6 +17,7 @@ LNBITS_DEFAULT_WALLET_NAME="LNbits wallet" LNBITS_DATA_FOLDER="./data" # LNBITS_DATABASE_URL="postgres://user:password@host:port/databasename" +# disable selected extensions, or use "all" to disable all extensions LNBITS_DISABLED_EXTENSIONS="amilk,ngrok" LNBITS_FORCE_HTTPS=true LNBITS_SERVICE_FEE="0.0" diff --git a/lnbits/helpers.py b/lnbits/helpers.py index 0370edbc..8b57fe2b 100644 --- a/lnbits/helpers.py +++ b/lnbits/helpers.py @@ -29,6 +29,9 @@ class ExtensionManager: def extensions(self) -> List[Extension]: output = [] + if "all" in self._disabled: + return output + for extension in [ ext for ext in self._extension_folders if ext not in self._disabled ]: