From d115a6f139e0591c2407c0f2ee7a322b85fc01ac Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sat, 17 May 2025 15:00:48 +0200 Subject: [PATCH] Solved bug --- roles/health-nginx/templates/health-nginx.py.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/health-nginx/templates/health-nginx.py.j2 b/roles/health-nginx/templates/health-nginx.py.j2 index 13a48ad2..421b173e 100644 --- a/roles/health-nginx/templates/health-nginx.py.j2 +++ b/roles/health-nginx/templates/health-nginx.py.j2 @@ -15,13 +15,13 @@ def get_expected_statuses(domain: str, parts: list[str], redirected_domains: set Returns: A list of expected HTTP status codes. """ - {%- if domains | get_domain('listmonk') | safe_var | bool %} + {%- if domains.listmonk | safe_var | bool %} if domain == '{{domains | get_domain('listmonk')}}': return [404] {%- endif %} if (parts and parts[0] == 'www') or (domain in redirected_domains): return [301] - {%- if domains | get_domain('yourls') | safe_var | bool %} + {%- if domains.yourls | safe_var | bool %} if domain == '{{domains | get_domain('yourls')}}': return [403] {%- endif %} @@ -48,7 +48,7 @@ for filename in os.listdir(config_path): url = f"{{ web_protocol }}://{domain}" redirected_domains = [domain['source'] for domain in {{redirect_domain_mappings}}] - {%- if domains | get_domain('mailu') | safe_var | bool %} + {%- if domains.mailu | safe_var | bool %} redirected_domains.append("{{domains | get_domain('mailu')}}") {%- endif %}