Skip to content

Commit

Permalink
Merge pull request #481 from Tecnativa/fix-redirection-traefik3
Browse files Browse the repository at this point in the history
[FIX] Adapt redirections to Traefik 3
  • Loading branch information
pedrobaeza authored Jul 4, 2024
2 parents 911397e + 603b344 commit 964b624
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions _traefik3_paths_labels.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@

{# Echo all domains of a group, in a Traefik rule #}
{%- macro domains_rule(domain_group) -%}
Host(
{%- for host in domain_group.hosts -%}
`{{ host }}`
{%- if not loop.last %}, {% endif %}
{%- endfor -%}
)
{%- if domain_group.hosts | length == 1 -%}
Host(`{{ domain_group.hosts[0] }}`)
{%- else -%}
(Host(`{{ domain_group.hosts | join('`) || Host(`') }}`))
{%- endif -%}
{%- if domain_group.path_prefixes %} && {{ path_prefix_rule(domain_group.path_prefixes) }}
{%- endif %}
{%- endmacro %}
Expand Down

0 comments on commit 964b624

Please sign in to comment.