From b4c68696081bd7ad06784f79a40125cb302a96e6 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Fri, 2 Jun 2023 13:35:52 +0530 Subject: [PATCH] rico2: setup matrix well-knowns --- hosts/rico2/containers/adtya.xyz.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hosts/rico2/containers/adtya.xyz.nix b/hosts/rico2/containers/adtya.xyz.nix index ddbad70..d127fc1 100644 --- a/hosts/rico2/containers/adtya.xyz.nix +++ b/hosts/rico2/containers/adtya.xyz.nix @@ -9,6 +9,18 @@ serverAliases = ["www.adtya.xyz"]; extraConfig = '' reverse_proxy http://127.0.0.1:3000 + + handle /.well-known/matrix/server { + header Content-Type application/json + header Access-Control-Allow-Origin * + respond `{"m.server": "matrix.adtya.xyz:443"}` + } + + handle /.well-known/matrix/client { + header Content-Type application/json + header Access-Control-Allow-Origin * + respond `{"m.homeserver": {"base_url": "https://matrix.adtya.xyz:443"}}` + } ''; }; }