diff --git a/management/web_update.py b/management/web_update.py index e2b720a1..091bd068 100644 --- a/management/web_update.py +++ b/management/web_update.py @@ -137,7 +137,7 @@ def make_domain_config(domain, templates, ssl_certificates, env): nginx_conf_extra = "" # Add .well-known redirects for CalDAV and CardDAV to TLD, which may make for better service discovery - if len(domain.split('.'))==2: + if len(domain.count('.'))==1: # something.tld nginx_conf_extra += f"\n\trewrite ^/.well-known/caldav https://{env['PRIMARY_HOSTNAME']}/cloud/remote.php/dav/ redirect;" nginx_conf_extra += f"\n\trewrite ^/.well-known/carddav https://{env['PRIMARY_HOSTNAME']}/cloud/remote.php/dav/ redirect;\n" nginx_conf_extra += f"\n\tlocation /dav {{"