use cname instead of resove it for wkd
This commit is contained in:
parent
b8be51799c
commit
9db6377526
|
@ -254,9 +254,10 @@ func (app *wkdApp) replaceLink(src, link string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func getWKDDomain(ctx context.Context, domain string) (string, bool) {
|
func getWKDDomain(ctx context.Context, domain string) (string, bool) {
|
||||||
cname, err := net.DefaultResolver.LookupCNAME(ctx, "openpgpkey."+domain)
|
adv := "openpgpkey." + domain
|
||||||
|
_, err := net.DefaultResolver.LookupCNAME(ctx, adv)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return strings.Trim(cname, "."), true
|
return adv, true
|
||||||
}
|
}
|
||||||
return domain, false
|
return domain, false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user