From e5afe1d0dea0de47399ff5d0b72dabc2759ce052 Mon Sep 17 00:00:00 2001 From: Roman Astrakhantsev Date: Sat, 14 Oct 2023 15:38:15 +0300 Subject: [PATCH] Fixed target parsing Improved http(s) scheme check so that target may be passed in lower and upper cases. Signed-off-by: Roman Astrakhantsev --- prober/http.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prober/http.go b/prober/http.go index 232214c3..b5790ba8 100644 --- a/prober/http.go +++ b/prober/http.go @@ -309,7 +309,8 @@ func ProbeHTTP(ctx context.Context, target string, module config.Module, registr httpConfig := module.HTTP - if !strings.HasPrefix(target, "http://") && !strings.HasPrefix(target, "https://") { + targetLower := strings.ToLower(target) + if !strings.HasPrefix(targetLower, "http://") && !strings.HasPrefix(targetLower, "https://") { target = "http://" + target }