Fix matrix public_baseurl being wrong
Still forward traffic on vanpetegem.me for now, since clients don't seem to update automatically (immediately?).
This commit is contained in:
parent
d76b03ed7f
commit
ed11652607
2 changed files with 15 additions and 2 deletions
|
@ -69,7 +69,20 @@
|
|||
}; in
|
||||
{
|
||||
"/_matrix" = matrixRedirect;
|
||||
"/.well-known/matrix" = matrixRedirect;
|
||||
"/.well-known/matrix" = {
|
||||
root = pkgs.runCommandNoCC "well-known-matrix" { } ''
|
||||
mkdir -p $out/.well-known/matrix
|
||||
echo '{"m.server":"matrix.vanpetegem.me:443"}' > $out/.well-known/matrix/server
|
||||
echo '{"m.homeserver":{"base_url":"https://matrix.vanpetegem.me"}}' > $out/.well-known/matrix/client
|
||||
'';
|
||||
extraConfig = ''
|
||||
default_type application/json;
|
||||
add_header 'access-control-allow-origin' '*' always;
|
||||
add_header 'access-control-allow-methods' 'GET, HEAD, POST, PUT, DELETE, OPTIONS' always;
|
||||
add_header 'access-control-allow-headers' 'X-Requested-With, Content-Type, Authorization, Date' always;
|
||||
'';
|
||||
priority = 1;
|
||||
};
|
||||
"/".return = "307 https://www.vanpetegem.me$request_uri";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
matrix-synapse = {
|
||||
enable = true;
|
||||
server_name = "vanpetegem.me";
|
||||
public_baseurl = "https://vanpetegem.me";
|
||||
public_baseurl = "https://matrix.vanpetegem.me";
|
||||
listeners = [{
|
||||
port = 8448;
|
||||
bind_address = "localhost";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue