Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit adfc471

Browse files
authored
Merge pull request #65 from xens/keep_proxied_state
Keep proxied state during IP-address update
2 parents b3809fe + a47bfcb commit adfc471

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

examples/example_update_dynamic_dns.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,16 @@ def do_dns_update(cf, zone_name, zone_id, dns_name, ip_address, ip_address_type)
6565
updated = True
6666
continue
6767

68+
proxied_state = dns_record['proxied']
69+
6870
# Yes, we need to update this record - we know it's the same address type
6971

7072
dns_record_id = dns_record['id']
7173
dns_record = {
7274
'name':dns_name,
7375
'type':ip_address_type,
74-
'content':ip_address
76+
'content':ip_address,
77+
'proxied':proxied_state
7578
}
7679
try:
7780
dns_record = cf.zones.dns_records.put(zone_id, dns_record_id, data=dns_record)

0 commit comments

Comments
 (0)