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:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user