From b0f743767bf907df56c4a5310ab0938bc73f8722 Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Tue, 24 Jan 2023 20:13:34 -0500 Subject: [PATCH] Fixed unwanted injection of variables on API endpoints. --- bazarr/app/ui.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bazarr/app/ui.py b/bazarr/app/ui.py index 8680e90c4..c5bd41736 100644 --- a/bazarr/app/ui.py +++ b/bazarr/app/ui.py @@ -74,12 +74,14 @@ def catch_all(path): updated = '0' inject = dict() - inject["baseUrl"] = base_url - inject["canUpdate"] = not args.no_update - inject["hasUpdate"] = updated != '0' - if auth: - inject["apiKey"] = settings.auth.apikey + if not path.startswith('api/'): + inject["baseUrl"] = base_url + inject["canUpdate"] = not args.no_update + inject["hasUpdate"] = updated != '0' + + if auth: + inject["apiKey"] = settings.auth.apikey template_url = base_url if not template_url.endswith("/"):