fix: update Traefik redirect regex for canonical domain handling
This commit is contained in:
parent
9f91f97693
commit
454ff41f1b
1 changed files with 2 additions and 2 deletions
|
|
@ -192,8 +192,8 @@ services:
|
|||
- "traefik.http.routers.app-www.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.routers.app-www.middlewares=redirect-apex"
|
||||
# APEX REDIRECT
|
||||
- "traefik.http.middlewares.redirect-apex.redirectregex.regex=^https?://www\\.${DOMAIN//./\\.}/(.*)"
|
||||
- "traefik.http.middlewares.redirect-apex.redirectregex.replacement=https://${DOMAIN}/$${1}"
|
||||
- "traefik.http.middlewares.redirect-apex.redirectregex.regex=^https?://www\\.(.*)"
|
||||
- "traefik.http.middlewares.redirect-apex.redirectregex.replacement=https://$$1"
|
||||
- "traefik.http.middlewares.redirect-apex.redirectregex.permanent=true"
|
||||
# CANONICAL DOMAIN
|
||||
- "traefik.http.routers.app.rule=Host(`${DOMAIN}`)"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue