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

.well-known redirection for access by federation

Create .well-known redirection for access by federation
This commit is contained in:
Thatoo 2019-07-01 13:06:03 +02:00 committed by GitHub
parent 6aff0d71d3
commit 1b9e45b38e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -193,6 +193,23 @@ form_secret=$(egrep "^form_secret" homeserver.yml | cut -d'"' -f2)
ynh_app_setting_set $app registration_shared_secret "$registration_shared_secret" ynh_app_setting_set $app registration_shared_secret "$registration_shared_secret"
ynh_app_setting_set $app form_secret "$form_secret" ynh_app_setting_set $app form_secret "$form_secret"
# Create .well-known redirection for access by federation
if [[ $server_name != $domain ]]; then
cat > /var/www/.well-known/${domain}/server_name.json <<EOF
{
"m.server": "$domain"
}
EOF
cat > /etc/nginx/conf.d/${domain}.d/name_server.conf <<EOF
{
location /.well-known/matrix/server {
alias /var/www/.well-known/${domain}/server_name.json;
}
}
EOF
fi
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
#================================================= #=================================================