httpreq: Allow use environment vars from a _FILE file (#1000)
This commit is contained in:
parent
635b9ac93d
commit
a8484e3954
1 changed files with 3 additions and 4 deletions
|
@ -9,7 +9,6 @@ import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
|
||||||
"path"
|
"path"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -68,9 +67,9 @@ func NewDNSProvider() (*DNSProvider, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
config := NewDefaultConfig()
|
config := NewDefaultConfig()
|
||||||
config.Mode = os.Getenv("HTTPREQ_MODE")
|
config.Mode = env.GetOrFile("HTTPREQ_MODE")
|
||||||
config.Username = os.Getenv("HTTPREQ_USERNAME")
|
config.Username = env.GetOrFile("HTTPREQ_USERNAME")
|
||||||
config.Password = os.Getenv("HTTPREQ_PASSWORD")
|
config.Password = env.GetOrFile("HTTPREQ_PASSWORD")
|
||||||
config.Endpoint = endpoint
|
config.Endpoint = endpoint
|
||||||
return NewDNSProviderConfig(config)
|
return NewDNSProviderConfig(config)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue