File tree Expand file tree Collapse file tree
clusters/cyrannus/picon/apps/traefik Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,3 +94,42 @@ extra:
9494 ports:
9595 - port: 9000
9696 name: http
97+
98+
99+ # Matrix well-known delegation via redirect — no pod, no plugin.
100+ # Replace example.net with your domain.
101+ #
102+ # Synapse side (homeserver.yaml ):
103+ # public_baseurl: " https://matrix.example.net/"
104+ # serve_server_wellknown: true
105+ - apiVersion: traefik.io /v1alpha1
106+ kind: Middleware
107+ metadata:
108+ name: matrix-wellknown-
109+ namespace: traefik
110+ spec:
111+ redirectRegex:
112+ regex: '^https://{{ .Values.primary_domain | replace " ." " \\ ." }}/\.well -known/matrix/(. *)'
113+ replacement: 'https://matrix. {{ .Values.primary_domain }}/.well -known/matrix/$ {1}'
114+ # 302, deliberately: permanent redirects get cached by intermediaries,
115+ # which makes future delegation changes unpleasant to roll out.
116+ permanent: false
117+ ---
118+ apiVersion: traefik.io /v1alpha1
119+ kind: IngressRoute
120+ metadata:
121+ name: matrix-wellknown
122+ namespace: traefik
123+ spec:
124+ entryPoints:
125+ - websecure
126+ - webinternal
127+ routes:
128+ - kind: Rule
129+ match: Host(` {{ .Values.primary_domain }}` ) && PathPrefix(` /.well-known/matrix` )
130+ middlewares:
131+ - name: matrix-wellknown-redirect
132+ services:
133+ - name: noop@internal
134+ kind: TraefikService
135+ # no tls block needed: your default cert covers the apex SAN
You can’t perform that action at this time.
0 commit comments