15 lines
577 B
YAML
15 lines
577 B
YAML
---
|
|
|
|
services:
|
|
traefik:
|
|
command:
|
|
# Redirection HTTP to HTTPS
|
|
- --entrypoints.web.http.redirections.entrypoint.to=websecure
|
|
- --entrypoints.web.http.redirections.entrypoint.scheme=https
|
|
labels:
|
|
# Redirection to remove www.
|
|
traefik.http.middlewares.redirect-www.redirectregex.permanent: 'true'
|
|
traefik.http.middlewares.redirect-www.redirectregex.regex: 'https://www\.(.*)'
|
|
traefik.http.middlewares.redirect-www.redirectregex.replacement: 'https://$${1}'
|
|
traefik.entrypoints.websecure.http.middlewares: '["redirect-www"]'
|