Add support for unencrypted HTTP apps (please don't use this 😢)

This commit is contained in:
3wc 2024-03-30 17:59:48 -03:00
parent ecc12b2b68
commit f7f77dc942
3 changed files with 9 additions and 2 deletions

View File

@ -130,3 +130,8 @@ COMPOSE_FILE="compose.yml"
#COMPOSE_FILE="$COMPOSE_FILE:compose.basicauth.yml" #COMPOSE_FILE="$COMPOSE_FILE:compose.basicauth.yml"
#BASIC_AUTH=1 #BASIC_AUTH=1
#SECRET_USERSFILE_VERSION=v1 #SECRET_USERSFILE_VERSION=v1
#####################################################################
# Extremely insecure options, do not use #
#####################################################################
#DISABLE_HTTPS_REDIRECT=1

View File

@ -1,3 +1,3 @@
export TRAEFIK_YML_VERSION=v18 export TRAEFIK_YML_VERSION=v19
export FILE_PROVIDER_YML_VERSION=v9 export FILE_PROVIDER_YML_VERSION=v9
export ENTRYPOINT_VERSION=v2 export ENTRYPOINT_VERSION=v2

View File

@ -24,10 +24,12 @@ api:
entrypoints: entrypoints:
web: web:
address: ":80" address: ":80"
{{ if not (eq (env "DISABLE_HTTPS_REDIRECT") "1") }}
http: http:
redirections: redirections:
entryPoint: entryPoint:
to: web-secure to: web-secure
{{ end }}
web-secure: web-secure:
address: ":443" address: ":443"
{{ if eq (env "GITEA_SSH_ENABLED") "1" }} {{ if eq (env "GITEA_SSH_ENABLED") "1" }}
@ -114,4 +116,4 @@ certificatesResolvers:
resolvers: resolvers:
- "1.1.1.1:53" - "1.1.1.1:53"
- "9.9.9.9:53" - "9.9.9.9:53"
{{ end }} {{ end }}