Small fix to disable all extensions

This commit is contained in:
Tiago vasconcelos 2021-07-05 10:02:36 +01:00
parent b7332bea64
commit 3f6393a943
2 changed files with 4 additions and 0 deletions

View file

@ -17,6 +17,7 @@ LNBITS_DEFAULT_WALLET_NAME="LNbits wallet"
LNBITS_DATA_FOLDER="./data" LNBITS_DATA_FOLDER="./data"
# LNBITS_DATABASE_URL="postgres://user:password@host:port/databasename" # 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_DISABLED_EXTENSIONS="amilk,ngrok"
LNBITS_FORCE_HTTPS=true LNBITS_FORCE_HTTPS=true
LNBITS_SERVICE_FEE="0.0" LNBITS_SERVICE_FEE="0.0"

View file

@ -29,6 +29,9 @@ class ExtensionManager:
def extensions(self) -> List[Extension]: def extensions(self) -> List[Extension]:
output = [] output = []
if "all" in self._disabled:
return output
for extension in [ for extension in [
ext for ext in self._extension_folders if ext not in self._disabled ext for ext in self._extension_folders if ext not in self._disabled
]: ]: