Add permanent redirect from http to https

This commit is contained in:
Patrick Jentsch 2020-06-02 10:02:27 +02:00
parent d5569fa65b
commit 9f62e782f0

View File

@ -20,8 +20,10 @@ services:
- "traefik.enable=true"
### <http> ###
- "traefik.http.middlewares.nopaque-headers.headers.customrequestheaders.X-Forwarded-Proto=http"
- "traefik.http.middlewares.nopaque-redirectscheme.redirectscheme.scheme=https"
- "traefik.http.middlewares.nopaque-redirectscheme.redirectscheme.permanent=true"
- "traefik.http.routers.nopaque.entrypoints=web"
- "traefik.http.routers.nopaque.middlewares=nopaque-headers"
- "traefik.http.routers.nopaque.middlewares=nopaque-headers, nopaque-redirectscheme"
- "traefik.http.routers.nopaque.rule=Host(`nopaque.localhost`)" # Change this to match your nopaque domain
### </http> ###
### <https> ###
@ -33,7 +35,7 @@ services:
### </https> ###
### <basicauth help="https://docs.traefik.io/middlewares/basicauth/"> ###
# - "traefik.http.middlewares.nopaque-basicauth.basicauth.users=name:hashed-password"
# - "traefik.http.routers.nopaque.middlewares=nopaque-basicauth, nopaque-headers"
# - "traefik.http.routers.nopaque.middlewares=nopaque-basicauth, nopaque-headers, nopaque-redirectscheme"
# - "traefik.http.middlewares.nopaquesecure-basicauth.basicauth.users=name:hashed-password"
# - "traefik.http.routers.nopaquesecure.middlewares=nopaquesecure-basicauth, nopaquesecure-headers"
### </basicauth> ###