nameserver.go: use custom resolver to avoid update delays caused by dns caching
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

This commit is contained in:
Thomas Preisner 2021-09-12 02:08:53 +02:00
parent 8e86f5992e
commit 204d5eacf6
2 changed files with 25 additions and 5 deletions

2
web.go
View file

@ -124,7 +124,7 @@ func RequestHandler(cfg *Config) func(w http.ResponseWriter, r *http.Request) {
return
}
if !requiresRRUpdate(entry, ipaddr) {
if !requiresRRUpdate(entry.Recordname, ipaddr, getResolver(entry.Nameserver)) {
fmt.Fprintf(w, "nochg %s\n", ipaddr.String())
return
}