Skip to content

Commit

Permalink
fixed #40: single service breaking template rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaudin committed Jan 15, 2024
1 parent ee814b9 commit 79428df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reverse-proxy/gen-caddyfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def should_protect(self) -> bool:
{% if nb_services == 0 %}# no service at all (testing?)
respond "Hello world, you requested no service outch." 200
{% elif nb_services == 1 %}# single service, redirecting from home
redir / /{{services.values().0.name}} permanent
redir / /{{ services.values() | map(attribute='name') | list | last }} permanent
{% else %}# home service has no endpoint
reverse_proxy home:80
{% endif %}
Expand Down

0 comments on commit 79428df

Please sign in to comment.