mirror of
https://github.com/taigrr/godns
synced 2025-01-18 04:03:25 -08:00
fix basic auth issue
This commit is contained in:
parent
60aa9aac27
commit
18f23c4dcf
@ -78,11 +78,11 @@ func (handler *Handler) DomainLoop(domain *godns.Domain, panicChan chan<- godns.
|
||||
func (handler *Handler) UpdateIP(domain, subDomain, currentIP string) {
|
||||
values := url.Values{}
|
||||
values.Add("hostname", fmt.Sprintf("%s.%s", subDomain, domain))
|
||||
values.Add("username:password", fmt.Sprintf("%s:%s", handler.Configuration.Email, handler.Configuration.Password))
|
||||
values.Add("myip", currentIP)
|
||||
|
||||
client := godns.GetHttpClient(handler.Configuration)
|
||||
req, _ := http.NewRequest("POST", GoogleUrl, strings.NewReader(values.Encode()))
|
||||
req.SetBasicAuth(handler.Configuration.Email, handler.Configuration.Password)
|
||||
|
||||
if handler.Configuration.UserAgent != "" {
|
||||
req.Header.Add("User-Agent", handler.Configuration.UserAgent)
|
||||
|
Loading…
x
Reference in New Issue
Block a user