mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-10-07 20:39:59 +08:00
CLOUDFLAREAPI: Now works with PunyCode/IDNA (#1019)
This commit is contained in:
parent
6efedd689d
commit
0893f74895
2 changed files with 6 additions and 2 deletions
|
@ -767,9 +767,8 @@ func makeTests(t *testing.T) []*TestGroup {
|
||||||
),
|
),
|
||||||
|
|
||||||
testgroup("IDNA",
|
testgroup("IDNA",
|
||||||
not("SOFTLAYER", "CLOUDFLAREAPI"),
|
not("SOFTLAYER"),
|
||||||
// SOFTLAYER: fails at direct internationalization, punycode works, of course.
|
// SOFTLAYER: fails at direct internationalization, punycode works, of course.
|
||||||
// CLOUDFLAREAPI: fails. Needs to be debugged.
|
|
||||||
tc("Internationalized name", a("ööö", "1.2.3.4")),
|
tc("Internationalized name", a("ööö", "1.2.3.4")),
|
||||||
tc("Change IDN", a("ööö", "2.2.2.2")),
|
tc("Change IDN", a("ööö", "2.2.2.2")),
|
||||||
tc("Internationalized CNAME Target", cname("a", "ööö.com.")),
|
tc("Internationalized CNAME Target", cname("a", "ööö.com.")),
|
||||||
|
|
|
@ -149,6 +149,11 @@ func (c *cloudflareProvider) getDomainID(name string) (string, error) {
|
||||||
|
|
||||||
// GetDomainCorrections returns a list of corrections to update a domain.
|
// GetDomainCorrections returns a list of corrections to update a domain.
|
||||||
func (c *cloudflareProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
|
func (c *cloudflareProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
|
||||||
|
err := dc.Punycode()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
id, err := c.getDomainID(dc.Name)
|
id, err := c.getDomainID(dc.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Add table
Reference in a new issue