mirror of
https://github.com/timothymiller/cloudflare-ddns.git
synced 2026-03-21 22:48:57 -03:00
CNAME records
- Recommended way to configure multiple subdomains per IP address is now via CNAME records. Notes added in README. - Updated config.json subdomain examples to reflect how base domain is appended in code.
This commit is contained in:
@@ -47,7 +47,8 @@ def commitRecord(ip):
|
||||
"content": ip["ip"],
|
||||
"proxied": c["proxied"]
|
||||
}
|
||||
list = cf_api("zones/" + c['zone_id'] + "/dns_records&per_page=100?type=" + ip["type"], "GET", c)
|
||||
list = cf_api(
|
||||
"zones/" + c['zone_id'] + "/dns_records&per_page=100?type=" + ip["type"], "GET", c)
|
||||
full_subdomain = subdomain + "." + base_domain_name
|
||||
dns_id = ""
|
||||
for r in list["result"]:
|
||||
@@ -71,7 +72,8 @@ def commitRecord(ip):
|
||||
# Delete duplicate, stale records
|
||||
for identifier in stale_record_ids:
|
||||
print("Deleting stale record " + str(identifier))
|
||||
response = cf_api("zones/" + c['zone_id'] + "/dns_records/" + identifier, "DELETE", c)
|
||||
response = cf_api(
|
||||
"zones/" + c['zone_id'] + "/dns_records/" + identifier, "DELETE", c)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user