add validation logging

This commit is contained in:
Alisdair MacLeod
2026-02-02 10:53:46 +00:00
parent 095379fa60
commit fa6ff005f2
@@ -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
} }