diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-01-31 09:28:21 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-01-31 09:28:21 +0100 |
| commit | d9a874765ce847e93223bc31e2efc9166312e11a (patch) | |
| tree | 1e8b059fea12e0ace200fc2c8fe60ed88e42bdb0 /internal/util/util.go | |
| parent | b320b13b5d019c26928d2f00d8cba0febacb104b (diff) | |
HTTP + Util: Always set the scheme to HTTPS
Diffstat (limited to 'internal/util/util.go')
| -rw-r--r-- | internal/util/util.go | 3 |
1 files changed, 2 insertions, 1 deletions
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 != "" { |
