mirror of
https://github.com/NewFuture/DDNS.git
synced 2022-04-19 20:24:44 +00:00
feat(cf): keep proxied config in cloudflare (#314)
This commit is contained in:
+2
-2
@@ -39,7 +39,7 @@ def request(method, action, param=None, **params):
|
||||
"""
|
||||
if param:
|
||||
params.update(param)
|
||||
|
||||
|
||||
params = dict((k, params[k]) for k in params if params[k] is not None)
|
||||
info("%s/%s : %s", API.SITE, action, params)
|
||||
if Config.PROXY:
|
||||
@@ -137,7 +137,7 @@ def update_record(domain, value, record_type="A"):
|
||||
for (rid, record) in records.items():
|
||||
if record['content'] != value:
|
||||
res = request('PUT', '/' + zoneid + '/dns_records/' + record['id'],
|
||||
type=record_type, content=value, name=domain, ttl=Config.TTL)
|
||||
type=record_type, content=value, name=domain, proxied=record['proxied'], ttl=Config.TTL)
|
||||
if res:
|
||||
get_records.records[cache_key][rid]['content'] = value
|
||||
result[rid] = res.get("name")
|
||||
|
||||
Reference in New Issue
Block a user