From d9a874765ce847e93223bc31e2efc9166312e11a Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Tue, 31 Jan 2023 09:28:21 +0100 Subject: HTTP + Util: Always set the scheme to HTTPS --- internal/util/util.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal/util') diff --git a/internal/util/util.go b/internal/util/util.go index 01b2f21..4370fd1 100644 --- a/internal/util/util.go +++ b/internal/util/util.go @@ -24,7 +24,8 @@ func EnsureValidURL(s string) (string, error) { return "", errors.WrapPrefix(err, "failed parsing url", 0) } - if u.Scheme == "" { + // Make sure the scheme is always https + if u.Scheme != "https" { u.Scheme = "https" } if u.Path != "" { -- cgit v1.2.3