mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-11 01:47:53 +08:00
Fix DNSimple crashes on Alias: (#322)
* Fix https://github.com/StackExchange/dnscontrol/issues/321
This commit is contained in:
parent
1097c96fcc
commit
e266e953d9
2 changed files with 4 additions and 1 deletions
|
@ -25,7 +25,7 @@ import (
|
|||
// TLSA
|
||||
// TXT
|
||||
// Pseudo-Types:
|
||||
// ALIAs
|
||||
// ALIAS
|
||||
// CF_REDIRECT
|
||||
// CF_TEMP_REDIRECT
|
||||
// FRAME
|
||||
|
|
|
@ -84,6 +84,9 @@ func (c *DnsimpleApi) GetDomainCorrections(dc *models.DomainConfig) ([]*models.C
|
|||
}
|
||||
rec.SetLabel(r.Name, dc.Name)
|
||||
switch rtype := r.Type; rtype {
|
||||
case "ALIAS":
|
||||
rec.Type = r.Type
|
||||
rec.SetTarget(r.Content)
|
||||
case "MX":
|
||||
if err := rec.SetTargetMX(uint16(r.Priority), r.Content); err != nil {
|
||||
panic(errors.Wrap(err, "unparsable record received from dnsimple"))
|
||||
|
|
Loading…
Reference in a new issue