Add SRV Records to help DAV autodiscovery (closes #1565)

This commit is contained in:
mdecimus 2025-05-27 08:28:23 +02:00
parent 1c1c9f559c
commit 2a5de2a987

View file

@ -184,11 +184,13 @@ impl DnsManagement for Server {
}
("http", _) if is_tls => {
has_https = true;
records.push(DnsRecord {
typ: "SRV".to_string(),
name: format!("_jmap._tcp.{domain_name}.",),
content: format!("0 1 {port} {server_name}."),
});
for service in ["jmap", "caldavs", "carddavs"] {
records.push(DnsRecord {
typ: "SRV".to_string(),
name: format!("_{service}._tcp.{domain_name}.",),
content: format!("0 1 {port} {server_name}."),
});
}
}
_ => (),
}