add traefik redirection for matrix well-known files

This commit is contained in:
Simon 2024-09-11 13:47:39 +02:00
parent 9214157959
commit 453e3d442a
2 changed files with 7 additions and 0 deletions

View File

@ -70,6 +70,7 @@ AUTHENTIK_COLOR_BACKGROUND_LIGHT=#1c1e21
# COMPOSE_FILE="$COMPOSE_FILE:compose.matrix.yml"
# ELEMENT_DOMAIN=element-web.example.com
# MATRIX_DOMAIN=matrix-synapse.example.com
# SECRET_MATRIX_ID_VERSION=v1
# SECRET_MATRIX_SECRET_VERSION=v1
# APP_ICONS="$APP_ICONS matrix:~/.abra/recipes/authentik/icons/matrix.svg"

View File

@ -1,5 +1,11 @@
version: "3.8"
services:
app:
deploy:
labels:
- "traefik.http.routers.${STACK_NAME}.middlewares=redirect-matrix-well-known"
- "traefik.http.middlewares.redirect-matrix-well-known.redirectregex.regex=^https://(.*)/.well-known/matrix/(.*)"
- "traefik.http.middlewares.redirect-matrix-well-known.redirectregex.replacement=https://${MATRIX_DOMAIN}/.well-known/matrix/$$2"
worker:
secrets:
- matrix_id