mirror of
https://github.com/timothymiller/cloudflare-ddns.git
synced 2026-03-21 14:38:56 -03:00
Deduplicate IPs before DNS record update
Remove duplicate IPs before updating DNS records to ensure stable input.
This commit is contained in:
@@ -65,8 +65,11 @@ pub async fn update_once(
|
||||
}
|
||||
|
||||
// Update DNS records (env var mode - domain-based)
|
||||
for (ip_type, domains) in &config.domains {
|
||||
let ips = detected_ips.get(ip_type).cloned().unwrap_or_default();
|
||||
for (ip_type, domains) in &config.domains {
|
||||
let mut ips = detected_ips.get(ip_type).cloned().unwrap_or_default();
|
||||
// FIX: remove duplicates so CloudflareHandle::set_ips sees stable input
|
||||
ips.sort();
|
||||
ips.dedup();
|
||||
let record_type = ip_type.record_type();
|
||||
|
||||
for domain_str in domains {
|
||||
|
||||
Reference in New Issue
Block a user