From 453e3d442a114f1de9e6017ce4aab91b8e47d95d Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 11 Sep 2024 13:47:39 +0200 Subject: [PATCH] add traefik redirection for matrix well-known files --- .env.sample | 1 + compose.matrix.yml | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/.env.sample b/.env.sample index 50c183b..3c5fc50 100644 --- a/.env.sample +++ b/.env.sample @@ -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" diff --git a/compose.matrix.yml b/compose.matrix.yml index 69dac72..b37c4f6 100644 --- a/compose.matrix.yml +++ b/compose.matrix.yml @@ -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