fix: use effective_domain for service links and clean up stale DNS records
Unit Tests / test (push) Successful in 11m32s
Unit Tests / test (push) Successful in 11m32s
Dashboard, Email, Calendar, and Files pages were building service URLs with the internal LAN zone name (e.g. 'cell') instead of the public effective domain (e.g. 'pic2.pic.ngo'), and always using http:// even in DDNS mode where HTTPS is available. Changes: - Dashboard/Email/Calendar/Files: read effective_domain + domain_mode from ConfigContext; use effective_domain in non-LAN mode and https:// for all DDNS domain modes. - Calendar: show port 443 instead of 80 in DDNS mode. - network_manager.update_split_horizon_zone: when the primary internal zone name is a parent of the effective DDNS domain (e.g. pic.ngo is a parent of pic2.pic.ngo), remove stale bootstrap service records (api, calendar, files, mail, webmail, webdav) that pollute the DNS display and would shadow public DNS responses. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -21,12 +21,14 @@ import { useConfig } from '../contexts/ConfigContext';
|
||||
|
||||
function Dashboard({ isOnline }) {
|
||||
const navigate = useNavigate();
|
||||
const { domain = 'cell', cell_name = 'mycell' } = useConfig();
|
||||
const { domain = 'cell', cell_name = 'mycell', effective_domain, domain_mode = 'lan' } = useConfig();
|
||||
const svcDomain = (domain_mode !== 'lan' && effective_domain) ? effective_domain : domain;
|
||||
const proto = domain_mode === 'lan' ? 'http' : 'https';
|
||||
const SERVICES = [
|
||||
{ name: 'Cell Home', url: `http://${cell_name}.${domain}`, desc: 'Main UI — no login needed' },
|
||||
{ name: 'Calendar', url: `http://calendar.${domain}`, desc: 'Use your configured account credentials' },
|
||||
{ name: 'Files', url: `http://files.${domain}`, desc: 'Use your configured account credentials' },
|
||||
{ name: 'Webmail', url: `http://mail.${domain}`, desc: 'Use your configured account credentials' },
|
||||
{ name: 'Cell Home', url: domain_mode === 'lan' ? `http://${cell_name}.${domain}` : `https://${svcDomain}`, desc: 'Main UI — no login needed' },
|
||||
{ name: 'Calendar', url: `${proto}://calendar.${svcDomain}`, desc: 'Use your configured account credentials' },
|
||||
{ name: 'Files', url: `${proto}://files.${svcDomain}`, desc: 'Use your configured account credentials' },
|
||||
{ name: 'Webmail', url: `${proto}://mail.${svcDomain}`, desc: 'Use your configured account credentials' },
|
||||
];
|
||||
const [cellStatus, setCellStatus] = useState(null);
|
||||
const [servicesStatus, setServicesStatus] = useState(null);
|
||||
|
||||
Reference in New Issue
Block a user