mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-20 05:39:07 +02:00
add validation logging
This commit is contained in:
@@ -4,6 +4,8 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"net"
|
"net"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
type resolver interface {
|
type resolver interface {
|
||||||
@@ -36,6 +38,9 @@ func (v *Validator) IsValid(ctx context.Context, domain string, accept []string)
|
|||||||
|
|
||||||
cname, err := v.resolver.LookupCNAME(ctx, domain)
|
cname, err := v.resolver.LookupCNAME(ctx, domain)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.WithFields(log.Fields{
|
||||||
|
"domain": domain,
|
||||||
|
}).WithError(err).Error("Error resolving CNAME from resolver")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user