From f7f77dc942c70d181f3c520617f88d90121878ce Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Sat, 30 Mar 2024 17:59:48 -0300 Subject: [PATCH] =?UTF-8?q?Add=20support=20for=20unencrypted=20HTTP=20apps?= =?UTF-8?q?=20(please=20don't=20use=20this=20=F0=9F=98=A2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.sample | 5 +++++ abra.sh | 2 +- traefik.yml.tmpl | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.env.sample b/.env.sample index 30762dd..e765267 100644 --- a/.env.sample +++ b/.env.sample @@ -130,3 +130,8 @@ COMPOSE_FILE="compose.yml" #COMPOSE_FILE="$COMPOSE_FILE:compose.basicauth.yml" #BASIC_AUTH=1 #SECRET_USERSFILE_VERSION=v1 + +##################################################################### +# Extremely insecure options, do not use # +##################################################################### +#DISABLE_HTTPS_REDIRECT=1 diff --git a/abra.sh b/abra.sh index f42c912..550ac6b 100644 --- a/abra.sh +++ b/abra.sh @@ -1,3 +1,3 @@ -export TRAEFIK_YML_VERSION=v18 +export TRAEFIK_YML_VERSION=v19 export FILE_PROVIDER_YML_VERSION=v9 export ENTRYPOINT_VERSION=v2 diff --git a/traefik.yml.tmpl b/traefik.yml.tmpl index 0c94743..f0d2e3b 100644 --- a/traefik.yml.tmpl +++ b/traefik.yml.tmpl @@ -24,10 +24,12 @@ api: entrypoints: web: address: ":80" + {{ if not (eq (env "DISABLE_HTTPS_REDIRECT") "1") }} http: redirections: entryPoint: to: web-secure + {{ end }} web-secure: address: ":443" {{ if eq (env "GITEA_SSH_ENABLED") "1" }} @@ -114,4 +116,4 @@ certificatesResolvers: resolvers: - "1.1.1.1:53" - "9.9.9.9:53" - {{ end }} \ No newline at end of file + {{ end }}