From 01dcb769666e2835eec9d092f945b9af27eb8048 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Wed, 31 Dec 2025 16:18:24 -0300 Subject: [PATCH] communication: fix Matrix well-known auth JSON --- services/communication/wellknown.yaml | 44 ++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/services/communication/wellknown.yaml b/services/communication/wellknown.yaml index 8627e0e..56e0c74 100644 --- a/services/communication/wellknown.yaml +++ b/services/communication/wellknown.yaml @@ -26,6 +26,30 @@ data: "m.server": "live.bstein.dev:443" } --- +apiVersion: v1 +kind: ConfigMap +metadata: + name: matrix-wellknown-nginx + namespace: communication +data: + default.conf: | + server { + listen 80; + server_name _; + + root /usr/share/nginx/html; + + location = /.well-known/matrix/client { + default_type application/json; + try_files $uri =404; + } + + location = /.well-known/matrix/server { + default_type application/json; + try_files $uri =404; + } + } +--- apiVersion: apps/v1 kind: Deployment metadata: @@ -50,20 +74,26 @@ spec: - containerPort: 80 volumeMounts: - name: wellknown - mountPath: /usr/share/nginx/html/.well-known/matrix/client - subPath: client.json - - name: wellknown - mountPath: /usr/share/nginx/html/.well-known/matrix/server - subPath: server.json + mountPath: /usr/share/nginx/html/.well-known/matrix + readOnly: true + - name: nginx-config + mountPath: /etc/nginx/conf.d/default.conf + subPath: default.conf volumes: - name: wellknown configMap: name: matrix-wellknown items: - key: client.json - path: client.json + path: client - key: server.json - path: server.json + path: server + - name: nginx-config + configMap: + name: matrix-wellknown-nginx + items: + - key: default.conf + path: default.conf --- apiVersion: v1 kind: Service