diff --git a/hosts/c3d2-web/default.nix b/hosts/c3d2-web/default.nix index b3bd4dd3..81b78c47 100644 --- a/hosts/c3d2-web/default.nix +++ b/hosts/c3d2-web/default.nix @@ -50,6 +50,21 @@ in # Mastodon "~ ^/.well-known/webfinger".return = "301 https://c3d2.social/.well-known/webfinger?resource=acct%3ac3d2%40c3d2.social"; + # Matrix + "~ ^/.well-known/matrix/server" = { + return = "200 '{\"m.server\": \"matrix.c3d2.de:443\"}'"; + extraConfig = '' + add_header Content-Type application/json; + ''; + }; + "~ ^/.well-known/matrix/client" = { + return = "200 '{\"m.homeserver\": {\"base_url\": \"https://matrix.c3d2.de\"}}'"; + extraConfig = '' + add_header "Content-Type" application/json; + add_header "Access-Control-Allow-Origin" *; + ''; + }; + # SpaceAPI "/status.png".proxyPass = "http://[${hostRegistry.spaceapi.ip6}]:3000/status.png"; "/spaceapi.json".proxyPass = "http://[${hostRegistry.spaceapi.ip6}]:3000/spaceapi.json";