From 2dc33ec32eb2f41c394034d2f9d4d45f81bdd26d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 29 Jan 2019 09:19:08 +0100 Subject: [PATCH] Enable dav autodiscovery --- scripts/_common.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/_common.sh b/scripts/_common.sh index b52f258..492b68a 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -71,6 +71,17 @@ location /Microsoft-Server-ActiveSync/ { } " >> "$nginx_config_path" + + grep "/.well-known/caldav" $nginx_domain_path || echo "location /.well-known/caldav { + rewrite ^ https://\$server_name/SOGo/dav/; +} + " >> "$nginx_config_path" + + grep "/.well-known/carddav" $nginx_domain_path || echo "location /.well-known/carddav { + rewrite ^ https://\$server_name/SOGo/dav/; +} + " >> "$nginx_config_path" + ynh_store_file_checksum "$nginx_config_path" systemctl reload nginx