From cd8a1caa8b2f9c60b926ed90de7c921bf46ff97a Mon Sep 17 00:00:00 2001 From: Steve Hay Date: Thu, 22 Sep 2022 16:55:51 -0400 Subject: [PATCH] more efficient --- management/web_update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {{"