Skip to content
Permalink
Browse files

Merge pull request #22 from imjosh/traefik-redirect-http

add redirect http->https option to traefik proxy config. Keeping it clean, thanks @imjosh
  • Loading branch information...
BretFisher committed Jun 18, 2019
2 parents 8fe8b18 + b305428 commit 75a2655a354ac8928ab694b26d241f13e93a30fa
Showing with 7 additions and 3 deletions.
  1. +3 −1 stack-proxy-global.yml
  2. +4 −2 stack-proxy.yml
@@ -50,7 +50,9 @@ services:
- --consul.prefix=traefik
- --defaultentrypoints=http,https
- --entryPoints=Name:https Address::443 TLS
- --entryPoints=Name:http Address::80
- --entryPoints=Name:http Address::80 # don't force HTTPS
# - --entryPoints=Name:http Address::80 Redirect.EntryPoint:https # force HTTPS
## optional LetsEncrypt settings
# - --acme
# - --acme.email=${TRAEFIK_ACME_EMAIL}
# # TODO: envvar for email and default domain
@@ -36,15 +36,17 @@ services:
- --docker.watch
- --api
- --defaultentrypoints=http,https
- --entryPoints=Name:https Address::443 TLS
- --entryPoints=Name:http Address::80 # don't force HTTPS
# - --entryPoints=Name:http Address::80 Redirect.EntryPoint:https # force HTTPS
## optional LetsEncrypt settings
# - --acme
# - --acme.email=${TRAEFIK_ACME_EMAIL}
# # TODO: envvar for email and default domain
# - --acme.httpchallenge
# - --acme.httpchallenge.entrypoint=http
# - --acme.onhostrule=true
# - --acme.entrypoint=https
# - --entryPoints=Name:https Address::443 TLS
# - --entryPoints=Name:http Address::80
# - --acme.storage=/etc/traefik/acme/acme.json
# - --acme.acmelogging
# - --acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory

0 comments on commit 75a2655

Please sign in to comment.
You can’t perform that action at this time.