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; } } ---