Merge pull request #247 from talvasconcelos/fix/allowDisableAllExt

Small fix to disable all extensions
This commit is contained in:
Arc 2021-07-07 10:26:44 +01:00 committed by GitHub
commit 2b68ab301e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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
]: ]: