From 9c6001126146b9a5c14ef2befcd18c1572e17e5b Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Wed, 31 Dec 2025 19:13:08 -0300 Subject: [PATCH] communication: serve matrix well-known with trailing slash --- services/communication/wellknown.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/services/communication/wellknown.yaml b/services/communication/wellknown.yaml index 56e0c74..7ed7610 100644 --- a/services/communication/wellknown.yaml +++ b/services/communication/wellknown.yaml @@ -39,14 +39,17 @@ data: root /usr/share/nginx/html; - location = /.well-known/matrix/client { + # Some clients request a trailing slash; serve both. + location ~ ^/\\.well-known/matrix/client/?$ { default_type application/json; - try_files $uri =404; + add_header Access-Control-Allow-Origin "*" always; + try_files /.well-known/matrix/client =404; } - location = /.well-known/matrix/server { + location ~ ^/\\.well-known/matrix/server/?$ { default_type application/json; - try_files $uri =404; + add_header Access-Control-Allow-Origin "*" always; + try_files /.well-known/matrix/server =404; } } ---