You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{% set redirect_from_domains_list = TRAEFIK_DOMAINS_REDIRECT_FROM.strip().split(',') if TRAEFIK_DOMAINS_REDIRECT_FROM.strip() else [] %}
154
+
{% set redirect_to_domains_list = TRAEFIK_DOMAINS_REDIRECT_TO.strip().split(',') if TRAEFIK_DOMAINS_REDIRECT_TO.strip() else [] %}
155
+
{% set redirect_is_permanent_list = TRAEFIK_DOMAINS_REDIRECT_IS_PERMANENT.strip().split(',') if TRAEFIK_DOMAINS_REDIRECT_IS_PERMANENT.strip() else [] %}
156
+
157
+
{% for ix in range(redirect_from_domains_list | length) %}
158
+
159
+
{% set from_domain = redirect_from_domains_list[ix] %}
160
+
{% set from_domain_no_dots = from_domain.replace(".", "-") %}
161
+
{% set to_domain = redirect_to_domains_list[ix] %}
162
+
{% set redirect_is_permanent = redirect_is_permanent_list[ix] %}
163
+
164
+
# Regex below is redirecting any subdomains and path to new domain.
165
+
# Use https://regex101.com/r/58sIgx/2 for regex explanation and experimentation.
166
+
# Below we include dollar escaping and j2 expressions. It is not clean / pure regex
167
+
# You can fetch baked and clean regex from traefik dashboards.
0 commit comments