Optimized filter functions

This commit is contained in:
2025-07-13 14:20:22 +02:00
parent c8669e19cf
commit 5340d580ce
7 changed files with 69 additions and 22 deletions

View File

@@ -124,7 +124,7 @@ class FilterModule(object):
# Enable loading via ancestors
if (
self.is_feature_enabled(applications, 'portfolio_iframe', application_id)
self.is_feature_enabled(applications, 'port-ui-desktop', application_id)
and directive == 'frame-ancestors'
):
domain = domains.get('web-app-port-ui')[0]

View File

@@ -72,14 +72,12 @@ def get_app_conf(applications, application_id, config_path, strict=True):
try:
obj = applications[application_id]
except KeyError:
if strict:
raise AppConfigKeyError(
f"Application ID '{application_id}' not found in applications dict.\n"
f"path_trace: {path_trace}\n"
f"applications keys: {list(applications.keys())}\n"
f"config_path: {config_path}"
)
return False
raise AppConfigKeyError(
f"Application ID '{application_id}' not found in applications dict.\n"
f"path_trace: {path_trace}\n"
f"applications keys: {list(applications.keys())}\n"
f"config_path: {config_path}"
)
for part in config_path.split("."):
path_trace.append(part)