conduit: Add Element X support
This commit is contained in:
parent
355ae4b70b
commit
ab5e088016
|
@ -207,12 +207,28 @@ in {
|
||||||
merge_slashes off;
|
merge_slashes off;
|
||||||
'';
|
'';
|
||||||
|
|
||||||
locations."/_matrix" = {
|
locations = {
|
||||||
|
"/_matrix" = {
|
||||||
proxyPass = "http://${cfg.settings.global.address}:${toString cfg.settings.global.port}";
|
proxyPass = "http://${cfg.settings.global.address}:${toString cfg.settings.global.port}";
|
||||||
# Recommended by conduit
|
# Recommended by conduit
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Add Element X support
|
||||||
|
# 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