proxy matrix, add well-known as well

This commit is contained in:
k3t
2026-07-26 11:15:06 -06:00
parent 13cd25557c
commit d5ee81f7ae
@@ -17,4 +17,32 @@
};
};
};
services.nginx.virtualHosts = {
"k3t.dev".locations."/.well-known/matrix/client" = {
return = '{"m.homeserver":{"base_url":"https://matrix.k3t.dev"},"m.identity_server":{"base_url":"https://vector.im"}}';
extraConfig = ''
default_type application/json;
'';
};
"k3t.dev".locations."/.well-known/matrix/server" = {
return = '{"m.server": "matrix.k3t.dev:443"}';
extraConfig = ''
default_type application/json;
'';
};
"matrix.k3t.dev" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:6167";
proxyWebsockets = true;
extraConfig =
# required when the target is also TLS server with multiple hosts
"proxy_ssl_server_name on;" +
# required when the server wants to use HTTP Authentication
"proxy_pass_header Authorization;"
;
};
};
};
}