fix: include :// for better http/s recogitation

Signed-off-by: Dinifarb <andreas.vogt89@bluewin.ch>
This commit is contained in:
Dinifarb 2023-08-01 12:36:11 +02:00
parent 2fb5b89d92
commit f77bdcfa09
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ func NewResolver(file string, logger log.Logger, insecure_skip_verify bool) (*Re
flags := map[string]string{}
var fileBytes []byte
var err error
if strings.HasPrefix(file, "http") || strings.HasPrefix(file, "https") {
if strings.HasPrefix(file, "http://") || strings.HasPrefix(file, "https://") {
_ = level.Info(logger).Log("msg", fmt.Sprintf("Loading configuration file from URL: %v", file))
tr := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: insecure_skip_verify},