conduit: Use new upstream delegation support
This commit is contained in:
parent
222829d82a
commit
d568436d83
|
@ -18,6 +18,13 @@ in
|
||||||
server_name = domain;
|
server_name = domain;
|
||||||
database_backend = "rocksdb";
|
database_backend = "rocksdb";
|
||||||
|
|
||||||
|
# Set up delegation: https://docs.conduit.rs/delegation.html#automatic-recommended
|
||||||
|
# This is primarily to make sliding sync work
|
||||||
|
well_known = {
|
||||||
|
client = "https://${domain}";
|
||||||
|
server = "${domain}:443";
|
||||||
|
};
|
||||||
|
|
||||||
turn_uris =
|
turn_uris =
|
||||||
let
|
let
|
||||||
address = "${config.services.coturn.realm}:${toString config.services.coturn.listening-port}";
|
address = "${config.services.coturn.realm}:${toString config.services.coturn.listening-port}";
|
||||||
|
@ -230,19 +237,8 @@ in
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
"/.well-known/matrix" = {
|
||||||
# Add Element X support
|
proxyPass = "http://${cfg.settings.global.address}:${toString cfg.settings.global.port}";
|
||||||
# TODO(tlater): Remove when no longer required: https://github.com/vector-im/element-x-android/issues/1085
|
|
||||||
"=/.well-known/matrix/client" = {
|
|
||||||
alias = pkgs.writeText "well-known-matrix-client" (builtins.toJSON {
|
|
||||||
"m.homeserver".base_url = "https://${domain}";
|
|
||||||
"org.matrix.msc3575.proxy".url = "https://${domain}";
|
|
||||||
});
|
|
||||||
|
|
||||||
extraConfig = ''
|
|
||||||
default_type application/json;
|
|
||||||
add_header Access-Control-Allow-Origin "*";
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue