From 31ec6f460528d178700adddae61f942c0dfb0210 Mon Sep 17 00:00:00 2001 From: Stefan Mielke Date: Mon, 3 Jul 2023 09:31:10 +0200 Subject: [PATCH] fix redirect from http to https --- plugins/traefik-vhosts/templates/compose.yml.sigil | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/plugins/traefik-vhosts/templates/compose.yml.sigil b/plugins/traefik-vhosts/templates/compose.yml.sigil index f26d9b3a9..9755a1d7a 100644 --- a/plugins/traefik-vhosts/templates/compose.yml.sigil +++ b/plugins/traefik-vhosts/templates/compose.yml.sigil @@ -7,6 +7,8 @@ services: command: - --entrypoints.http.address=:80 {{ if $.TRAEFIK_LETSENCRYPT_EMAIL }} + - --entrypoints.http.http.redirections.entrypoint.to=https + - --entrypoints.http.http.redirections.entrypoint.scheme=https - --entrypoints.https.address=:443 {{ end }} - --providers.docker @@ -38,14 +40,6 @@ services: {{ if $.TRAEFIK_LETSENCRYPT_EMAIL }} - "traefik.http.routers.api.tls.certresolver=leresolver" - - # global redirect to https - - "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)" - - "traefik.http.routers.http-catchall.entrypoints=http" - - "traefik.http.routers.http-catchall.middlewares=redirect-to-https" - - # middleware redirect - - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" {{ end }} network_mode: bridge