From a8484e3954544eb97fa4e455e043689970d96dc2 Mon Sep 17 00:00:00 2001 From: Luis Gracia Date: Wed, 30 Oct 2019 16:40:49 -0400 Subject: [PATCH] httpreq: Allow use environment vars from a _FILE file (#1000) --- providers/dns/httpreq/httpreq.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/providers/dns/httpreq/httpreq.go b/providers/dns/httpreq/httpreq.go index 87edfa0c..23c792c0 100644 --- a/providers/dns/httpreq/httpreq.go +++ b/providers/dns/httpreq/httpreq.go @@ -9,7 +9,6 @@ import ( "io/ioutil" "net/http" "net/url" - "os" "path" "time" @@ -68,9 +67,9 @@ func NewDNSProvider() (*DNSProvider, error) { } config := NewDefaultConfig() - config.Mode = os.Getenv("HTTPREQ_MODE") - config.Username = os.Getenv("HTTPREQ_USERNAME") - config.Password = os.Getenv("HTTPREQ_PASSWORD") + config.Mode = env.GetOrFile("HTTPREQ_MODE") + config.Username = env.GetOrFile("HTTPREQ_USERNAME") + config.Password = env.GetOrFile("HTTPREQ_PASSWORD") config.Endpoint = endpoint return NewDNSProviderConfig(config) }