From 7ce8effacd624c3313feed5bd2f10f2e5d52d1c2 Mon Sep 17 00:00:00 2001 From: Yury Hrytsuk <50014626+YuryHrytsuk@users.noreply.github.com> Date: Wed, 8 Jan 2025 10:39:28 +0100 Subject: [PATCH] Fix traefik domain redirect for empty strings (#927) --- services/traefik/docker-compose.yml.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/traefik/docker-compose.yml.j2 b/services/traefik/docker-compose.yml.j2 index a19a23a3..13ae322b 100644 --- a/services/traefik/docker-compose.yml.j2 +++ b/services/traefik/docker-compose.yml.j2 @@ -150,9 +150,9 @@ services: ### # Domain redirects ### -{% set redirect_from_domains_list = TRAEFIK_DOMAINS_REDIRECT_FROM.split(',') %} -{% set redirect_to_domains_list = TRAEFIK_DOMAINS_REDIRECT_TO.split(',') %} -{% set redirect_is_permanent_list = TRAEFIK_DOMAINS_REDIRECT_IS_PERMANENT.split(',') %} +{% set redirect_from_domains_list = TRAEFIK_DOMAINS_REDIRECT_FROM.strip().split(',') if TRAEFIK_DOMAINS_REDIRECT_FROM.strip() else [] %} +{% set redirect_to_domains_list = TRAEFIK_DOMAINS_REDIRECT_TO.strip().split(',') if TRAEFIK_DOMAINS_REDIRECT_TO.strip() else [] %} +{% set redirect_is_permanent_list = TRAEFIK_DOMAINS_REDIRECT_IS_PERMANENT.strip().split(',') if TRAEFIK_DOMAINS_REDIRECT_IS_PERMANENT.strip() else [] %} {% for ix in range(redirect_from_domains_list | length) %}