Revert "forward logout to the media server"
This reverts commit 0d5f97e1d9
.
This commit is contained in:
parent
0be773bca8
commit
cd637d97e6
1 changed files with 34 additions and 38 deletions
|
@ -145,55 +145,51 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
services.nginx.virtualHosts = let
|
services.nginx.virtualHosts = let
|
||||||
mediaProxyConfig = {
|
|
||||||
proxyPass = "http://localhost:8008";
|
|
||||||
proxyWebsockets = true;
|
|
||||||
extraConfig = ''
|
|
||||||
proxy_hide_header Access-Control-Allow-Origin;
|
|
||||||
add_header Access-Control-Allow-Origin '*' always;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
main = {
|
main = {
|
||||||
sslCertificate = "/var/lib/acme/chir.rs/cert.pem";
|
sslCertificate = "/var/lib/acme/chir.rs/cert.pem";
|
||||||
sslCertificateKey = "/var/lib/acme/chir.rs/key.pem";
|
sslCertificateKey = "/var/lib/acme/chir.rs/key.pem";
|
||||||
locations = {
|
locations."/_matrix" = {
|
||||||
"/_matrix" = {
|
proxyPass = "https://matrix.int.chir.rs";
|
||||||
proxyPass = "https://matrix.int.chir.rs";
|
proxyWebsockets = true;
|
||||||
proxyWebsockets = true;
|
extraConfig = ''
|
||||||
extraConfig = ''
|
proxy_ssl_server_name on;
|
||||||
proxy_ssl_server_name on;
|
proxy_hide_header Access-Control-Allow-Origin;
|
||||||
proxy_hide_header Access-Control-Allow-Origin;
|
add_header Access-Control-Allow-Origin '*' always;
|
||||||
add_header Access-Control-Allow-Origin '*' always;
|
'';
|
||||||
'';
|
};
|
||||||
};
|
locations."/_matrix/media" = {
|
||||||
"/_matrix/media" = mediaProxyConfig;
|
proxyPass = "http://localhost:8008";
|
||||||
"/_matrix/client/v3/logout" = mediaProxyConfig;
|
proxyWebsockets = true;
|
||||||
locations."/.well-known/matrix/server" = {
|
extraConfig = ''
|
||||||
extraConfig = ''
|
proxy_hide_header Access-Control-Allow-Origin;
|
||||||
return 200 '{ "m.server": "matrix.chir.rs:443" }';
|
add_header Access-Control-Allow-Origin '*' always;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
locations."/.well-known/matrix/client" = {
|
locations."/.well-known/matrix/server" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
add_header Access-Control-Allow-Origin '*';
|
return 200 '{ "m.server": "matrix.chir.rs:443" }';
|
||||||
return 200 '{ "m.homeserver": { "base_url": "https://matrix.chir.rs" } }';
|
'';
|
||||||
'';
|
};
|
||||||
};
|
locations."/.well-known/matrix/client" = {
|
||||||
locations."/_synapse/metrics" = {
|
extraConfig = ''
|
||||||
extraConfig = ''
|
add_header Access-Control-Allow-Origin '*';
|
||||||
return 404 'Not found';
|
return 200 '{ "m.homeserver": { "base_url": "https://matrix.chir.rs" } }';
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
locations."/_synapse/metrics" = {
|
||||||
|
extraConfig = ''
|
||||||
|
return 404 'Not found';
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
"matrix.int.chir.rs" =
|
"matrix.int.chir.rs" = main;
|
||||||
|
"matrix.chir.rs" =
|
||||||
main
|
main
|
||||||
// {
|
// {
|
||||||
sslCertificate = "/var/lib/acme/int.chir.rs/cert.pem";
|
sslCertificate = "/var/lib/acme/int.chir.rs/cert.pem";
|
||||||
sslCertificateKey = "/var/lib/acme/int.chir.rs/key.pem";
|
sslCertificateKey = "/var/lib/acme/int.chir.rs/key.pem";
|
||||||
};
|
};
|
||||||
"matrix.chir.rs" = main;
|
|
||||||
"chir.rs" = {
|
"chir.rs" = {
|
||||||
locations."/.well-known/matrix/server" = {
|
locations."/.well-known/matrix/server" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|
Loading…
Reference in a new issue