Skip to content

Commit

Permalink
Merge pull request #22 from imjosh/traefik-redirect-http
Browse files Browse the repository at this point in the history
add redirect http->https option to traefik proxy config. Keeping it clean, thanks @imjosh
  • Loading branch information
BretFisher authored Jun 18, 2019
2 parents 8fe8b18 + b305428 commit 75a2655
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion stack-proxy-global.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions stack-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 75a2655

Please sign in to comment.