moved hsts middleware from section HTTP to section HTTPS

This commit is contained in:
Bryan Joshua Pedini 2022-08-16 16:06:40 +02:00
parent 503f438bdf
commit deb1b7ccb5

View File

@ -50,13 +50,13 @@ services:
# only some people can access the dashboard, hence protect it with it's whitelist
- traefik.http.routers.http-${TRAEFIK_ROUTER}.middlewares=dashboard-whitelist
# redirect Træfik dashboard to HTTPS only
- traefik.http.routers.http-${TRAEFIK_ROUTER}.middlewares=http-to-https,hsts
- traefik.http.routers.http-${TRAEFIK_ROUTER}.middlewares=http-to-https
- traefik.http.routers.http-${TRAEFIK_ROUTER}.rule=Host(`${TRAEFIK_MATCHRULE}`)
- traefik.http.routers.http-${TRAEFIK_ROUTER}.service=api@internal
### Section HTTPS
- traefik.http.routers.https-${TRAEFIK_ROUTER}.entrypoints=https
# only some people can access the dashboard, hence protect it with it's whitelist
- traefik.http.routers.https-${TRAEFIK_ROUTER}.middlewares=dashboard-whitelist
# only some people can access the dashboard, hence protect it with it's whitelist (and add HSTS for security)
- traefik.http.routers.https-${TRAEFIK_ROUTER}.middlewares=hsts,dashboard-whitelist
# configure Træfik dashboard to be the exposed service
- traefik.http.routers.https-${TRAEFIK_ROUTER}.rule=Host(`${TRAEFIK_MATCHRULE}`)
- traefik.http.routers.https-${TRAEFIK_ROUTER}.service=api@internal