mirror of https://git.envs.net/envs/ops.git
77 lines
1.8 KiB
Plaintext
77 lines
1.8 KiB
Plaintext
# matrix/support
|
|
location /.well-known/matrix/support {
|
|
add_header Access-Control-Allow-Origin '*';
|
|
add_header Content-Type application/json;
|
|
return 200 '{
|
|
"admins": [
|
|
{
|
|
"matrix_id": "@creme:envs.net",
|
|
"email_address": "hostmaster@envs.net",
|
|
"role": "admin"
|
|
}
|
|
],
|
|
"support_page": "https://matrix.to/#/#envs:envs.net",
|
|
"abuse_reports": "https://matrix.to/#/#abuse:envs.net"
|
|
}';
|
|
}
|
|
|
|
# matrix/server
|
|
location /.well-known/matrix/server {
|
|
add_header Access-Control-Allow-Origin '*';
|
|
add_header Content-Type application/json;
|
|
return 200 '{
|
|
"m.server": "matrix.envs.net:443"
|
|
}';
|
|
}
|
|
|
|
# matrix/client
|
|
location /.well-known/matrix/client {
|
|
add_header Access-Control-Allow-Origin '*';
|
|
add_header Content-Type application/json;
|
|
return 200 '{
|
|
"m.homeserver": {
|
|
"base_url": "https://matrix.envs.net"
|
|
},
|
|
"m.tile_server": {
|
|
"map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=jrKVgM1ozvdgREfvtZ8X"
|
|
}
|
|
}';
|
|
}
|
|
|
|
##
|
|
location ^~ /_matrix {
|
|
add_header Access-Control-Allow-Origin '*';
|
|
add_header Content-Type application/json;
|
|
return 404 '{
|
|
"errcode": "M_NOT_FOUND",
|
|
"error": "There are no Matrix endpoints here. Perhaps you forgot to resolve the client-server API URL?",
|
|
"solution": "Go to matrix.envs.net",
|
|
"spec": "https://spec.matrix.org/v1.9/server-server-api/#resolving-server-names"
|
|
}';
|
|
}
|
|
|
|
# media
|
|
location ^~ /_matrix/media {
|
|
return 302 https://matrix.envs.net$request_uri;
|
|
}
|
|
|
|
# maubot
|
|
location ^~ /_matrix/maubot {
|
|
include proxy_params;
|
|
proxy_ssl_name $http_host;
|
|
proxy_ssl_server_name on;
|
|
|
|
proxy_pass https://matrix.envs.net;
|
|
}
|
|
|
|
location ^~ /_matrix/maubot/v1/logs {
|
|
include proxy_params;
|
|
proxy_ssl_name $http_host;
|
|
proxy_ssl_server_name on;
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
proxy_pass https://matrix.envs.net;
|
|
}
|