From ffd3d04bc82b69f67682531c3eb43927afe8ee84 Mon Sep 17 00:00:00 2001 From: Lionel Sambuc Date: Sat, 17 Apr 2021 13:01:12 +0000 Subject: [PATCH] Add redirect to /dashboard/ --- docker-compose.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1647142..943bbc3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -56,10 +56,15 @@ services: # Priority goes from first in the list to last. - "traefik.http.middlewares.traefik.chain.middlewares=headers-base@file,headers-sts@file,headers-policy-self@file" + - "traefik.http.middlewares.treafik-redirect.redirectregex.permanent=true" + - "traefik.http.middlewares.treafik-redirect.redirectregex.regex=^https://${FQDN}/?$$" + - "traefik.http.middlewares.treafik-redirect.redirectregex.replacement=https://${FQDN}/dashboard/" + # Traefik Dashboard - "traefik.http.routers.traefik.service=api@internal" - "traefik.http.routers.traefik.entrypoints=web-secure" - - "traefik.http.routers.traefik.rule=Host(`${FQDN}`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))" + #- "traefik.http.routers.traefik.rule=Host(`${FQDN}`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))" + - "traefik.http.routers.traefik.rule=Host(`${FQDN}`)" - "traefik.http.routers.traefik.tls=true" - "traefik.http.routers.traefik.tls.certresolver=letsencrypt" - "traefik.http.routers.traefik.middlewares=traefik,net-home@file,auth-traefik@file"