c3d2-web: add matrix well-known entries

This commit is contained in:
Sandro - 2023-03-25 16:22:49 +01:00
parent 72d0a9bbd4
commit 52fd6f4e03
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 15 additions and 0 deletions

View File

@ -50,6 +50,21 @@ in
# Mastodon
"~ ^/.well-known/webfinger".return = "301 https://c3d2.social/.well-known/webfinger?resource=acct%3ac3d2%40c3d2.social";
# Matrix
"~ ^/.well-known/matrix/server" = {
return = "200 '{\"m.server\": \"matrix.c3d2.de:443\"}'";
extraConfig = ''
add_header Content-Type application/json;
'';
};
"~ ^/.well-known/matrix/client" = {
return = "200 '{\"m.homeserver\": {\"base_url\": \"https://matrix.c3d2.de\"}}'";
extraConfig = ''
add_header "Content-Type" application/json;
add_header "Access-Control-Allow-Origin" *;
'';
};
# SpaceAPI
"/status.png".proxyPass = "http://[${hostRegistry.spaceapi.ip6}]:3000/status.png";
"/spaceapi.json".proxyPass = "http://[${hostRegistry.spaceapi.ip6}]:3000/spaceapi.json";