WebServiceZonesApi: implemented default record ttl option.

This commit is contained in:
Shreyas Zare
2021-09-25 13:45:03 +05:30
parent bd70b9879e
commit 3854abe8c0

View File

@@ -37,6 +37,8 @@ namespace DnsServerCore
readonly DnsWebService _dnsWebService;
uint _defaultRecordTtl = 3600;
#endregion
#region constructor
@@ -509,7 +511,7 @@ namespace DnsServerCore
uint ttl;
string strTtl = request.QueryString["ttl"];
if (string.IsNullOrEmpty(strTtl))
ttl = 3600;
ttl = _defaultRecordTtl;
else
ttl = uint.Parse(strTtl);
@@ -1456,7 +1458,7 @@ namespace DnsServerCore
uint ttl;
string strTtl = request.QueryString["ttl"];
if (string.IsNullOrEmpty(strTtl))
ttl = 3600;
ttl = _defaultRecordTtl;
else
ttl = uint.Parse(strTtl);
@@ -1848,5 +1850,15 @@ namespace DnsServerCore
}
#endregion
#region properties
public uint DefaultRecordTtl
{
get { return _defaultRecordTtl; }
set { _defaultRecordTtl = value; }
}
#endregion
}
}