From 104b804059b88dd1f0d37f7935b996586cc4c719 Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Sat, 5 Sep 2015 20:06:30 +0000 Subject: [PATCH] if a custom DNS record exists for a web-serving domain and the record is just the box's IP address, don't skip this domain for serving web --- CHANGELOG.md | 4 ++++ management/web_update.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e277d8a..b4605f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ Calender/Contacts: * CalDAV/CardDAV and Exchange/ActiveSync for calendar/contacts wasn't working in some network configurations. +Web: + +* If a custom DNS record is set on a domain or 'www'+domain, web would not be served for that domain. If the custom DNS record is just the box's IP address, that's a configuration mistake, but allow it and let web continue to be served. + Control panel: * Added an option to check for new Mail-in-a-Box versions within status checks. It is off by default so that boxes don't "phone home" without permission. diff --git a/management/web_update.py b/management/web_update.py index 7fafbba..b1112c8 100644 --- a/management/web_update.py +++ b/management/web_update.py @@ -32,7 +32,7 @@ def get_domains_with_a_records(env): domains = set() dns = get_custom_dns_config(env) for domain, rtype, value in dns: - if rtype == "CNAME" or (rtype in ("A", "AAAA") and value != "local"): + if rtype == "CNAME" or (rtype in ("A", "AAAA") and value not in ("local", env['PUBLIC_IP'])): domains.add(domain) return domains