mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-03 00:07:05 +00:00
Add .well-known service discovery redirects to TLD
This commit is contained in:
parent
178a485831
commit
b5f5b0819d
@ -136,6 +136,11 @@ 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:
|
||||
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\n"
|
||||
|
||||
# Because the certificate may change, we should recognize this so we
|
||||
# can trigger an nginx update.
|
||||
def hashfile(filepath):
|
||||
|
Loading…
Reference in New Issue
Block a user