1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/synapse_ynh.git synced 2024-09-03 20:26:38 +02:00

Update .well-known redirection

for access by federation and applications like Riot.im
This commit is contained in:
Thatoo 2019-07-10 07:03:51 +02:00 committed by GitHub
parent 7b1abdd6db
commit 319f902d63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -195,15 +195,11 @@ ynh_app_setting_set $app form_secret "$form_secret"
# Create .well-known redirection for access by federation # Create .well-known redirection for access by federation
if [[ $server_name != $domain ]]; then if [[ $server_name != $domain ]]; then
cat > /var/www/.well-known/${server_name}/server_name.json <<EOF
{
"m.server": "$domain"
}
EOF
cat > /etc/nginx/conf.d/${server_name}.d/server_name.conf <<EOF cat > /etc/nginx/conf.d/${server_name}.d/server_name.conf <<EOF
location = /.well-known/matrix/server { location /.well-known/matrix/ {
alias /var/www/.well-known/${server_name}/server_name.json; return 200 '{"m.server": "$domain", "m.homeserver": "https://$domain"}';
add_header Content-Type application/json;
add_header Access-Control-Allow-Origin '*';
} }
EOF EOF
fi fi