From 76cfaf93adb200d095fba8949b66d97515a609fe Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Thu, 22 Dec 2022 16:56:30 +0200 Subject: [PATCH] fix: merge issue --- lnbits/helpers.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lnbits/helpers.py b/lnbits/helpers.py index 72b72e2a..26eb6bd8 100644 --- a/lnbits/helpers.py +++ b/lnbits/helpers.py @@ -96,14 +96,12 @@ class InstalledExtensionMiddleware: self.app = app async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: - pathname = scope["path"].split("/")[1] - if pathname in settings.lnbits_disabled_extensions: - path_elements = scope["path"].split("/") - if len(path_elements) > 2: - _, path_name, path_type, *rest = path_elements - else: - _, path_name = path_elements - path_type = None + path_elements = scope["path"].split("/") + if len(path_elements) > 2: + _, path_name, path_type, *rest = path_elements + else: + _, path_name = path_elements + path_type = None # block path for all users if the extension is disabled if path_name in settings.LNBITS_DISABLED_EXTENSIONS: