diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-08-18 05:25:05 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-08-18 05:25:05 +0200 |
commit | c38fdfa7d57b98e713a217829ff5abd85f9d84b4 (patch) | |
tree | ed50d05bf448e918c7b62b8680c4b8c5532459d5 /host | |
parent | Disable registration (diff) | |
download | Rory-Open-Architecture-c38fdfa7d57b98e713a217829ff5abd85f9d84b4.tar.xz |
Conduit well-known
Diffstat (limited to 'host')
-rwxr-xr-x | host/Rory-nginx/services/nginx/rory.gay/conduit.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/host/Rory-nginx/services/nginx/rory.gay/conduit.nix b/host/Rory-nginx/services/nginx/rory.gay/conduit.nix index d8527bd..03072af 100755 --- a/host/Rory-nginx/services/nginx/rory.gay/conduit.nix +++ b/host/Rory-nginx/services/nginx/rory.gay/conduit.nix @@ -22,4 +22,47 @@ ''; }; #locations."/_synapse/client".proxyPass = "http://192.168.1.5:8008"; + + + locations."= /.well-known/matrix/server".extraConfig = '' + more_set_headers 'Content-Type application/json'; + more_set_headers 'Access-Control-Allow-Origin *'; + return 200 '${builtins.toJSON { + "m.server" = "conduit.rory.gay:443"; + }}'; + ''; + locations."= /.well-known/matrix/client".extraConfig = '' + more_set_headers 'Content-Type application/json'; + more_set_headers 'Access-Control-Allow-Origin *'; + return 200 '${builtins.toJSON { + "m.homeserver".base_url = "https://conduit.rory.gay"; + "m.identity_server".base_url = "https://conduit.rory.gay"; + } + }'; + ''; + locations."= /.well-known/matrix/support".extraConfig = '' + more_set_headers 'Content-Type application/json'; + more_set_headers 'Access-Control-Allow-Origin *'; + return 200 '${builtins.toJSON { + admins = [ + { + matrix_id = "@emma:rory.gay"; + role = "admin"; + } + { + matrix_id = "@alicia:rory.gay"; + role = "admin"; + } + { + matrix_id = "@root:rory.gay"; + role = "admin"; + } + { + matrix_id = "@rory:rory.gay"; + role = "admin"; + } + ]; + } + }'; + ''; } |