Expose matrix-dendrite

This commit is contained in:
Charlotte 🦝 Delenk 2022-04-29 21:35:33 +01:00
parent 800dcd36ba
commit 302e4473f1
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122

View file

@ -71,4 +71,30 @@ in
"DATABASE matrix_media_repo" = "ALL PRIVILEGES";
};
}];
services.nginx.virtualHosts."matrix.chir.rs" = {
locations."/_matrix" = {
proxyPass = "https://matrix.int.chir.rs";
proxyWebsockets = true;
extraConfig = ''
proxy_ssl_server_name on;
'';
};
locations."/_matrix/media" = {
proxyPass = "http://localhost:8008";
proxyWebsockets = true;
};
};
services.nginx.virtualHosts."chir.rs" = {
locations."/.well-known/matrix/server" = {
extraConfig = ''
return 200 '{ "m.server": "matrix.chir.rs:443" }';
'';
};
locations."/.well-known/matrix/client" = {
extraConfig = ''
add_header Access-Control-Allow-Origin '*';
return 200 '{ "m.homeserver": { "base_url": "matrix.chir.rs:443" } }';
'';
};
};
}