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:
parent
6aff0d71d3
commit
1b9e45b38e
1 changed files with 17 additions and 0 deletions
|
@ -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
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue