Configure matrix server .well-known delegation

This commit is contained in:
fi 2024-01-28 21:59:08 +01:00
parent 4c0decea4a
commit 2ae1ad3604
Signed by: fi
SSH key fingerprint: SHA256:8DRwxuvrMOdTQEujJX6mkVEAzdPm6Fl9yJu+syGKBqM

View file

@ -34,6 +34,19 @@
return = "302 https://spaceapi.hamburg.ccc.de/";
};
locations."/.well-known/matrix/server" = {
return = "200 '{\"m.server\": \"matrix.hamburg.ccc.de:443\"}'";
extraConfig = ''
add_header Content-Type application/json;
'';
};
locations."/.well-known/matrix/client" = {
return = "200 '{\"m.homeserver\": {\"base_url\": \"https://matrix.hamburg.ccc.de\"}, \"m.identity_server\": {\"base_url\": \"https://vector.im\"}}'";
extraConfig = ''
default_type application/json;
add_header Access-Control-Allow-Origin *;
'';
};
# Redirect pages starting with 4 digits for redirecting the old blog
# article URLs.
# We want to redirect /yyyy/mm/dd/slug to /blog/yyyy/mm/dd/slug, but we