1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

add BaseURL option to namecheap creds to allow setting sandbox endpoint (#97)

This commit is contained in:
rbelnap
2017-04-25 11:24:55 -04:00
committed by Tom Limoncelli
parent 32fedd8b5f
commit 426c2ed38d
2 changed files with 23 additions and 0 deletions

View File

@ -27,6 +27,13 @@ func newReg(m map[string]string) (providers.Registrar, error) {
return nil, fmt.Errorf("Namecheap apikey and apiuser must be provided.")
}
api.client = nc.NewClient(api.ApiUser, api.ApiKey, api.ApiUser)
// if BaseURL is specified in creds, use that url
BaseURL, ok := m["BaseURL"]
if ok {
api.client.BaseURL = BaseURL
}
return api, nil
}