From a48b86c09aea9443876284255671cf9e5226aa0d Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Thu, 9 Mar 2023 21:23:25 -0600 Subject: [PATCH] !fix: Disallow access urls without valid scheme --- cli/server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/server.go b/cli/server.go index 94f4188aa2934..26c5b39076fe8 100644 --- a/cli/server.go +++ b/cli/server.go @@ -295,7 +295,8 @@ flags, and YAML configuration. The precedence is as follows: return xerrors.Errorf("TLS is disabled. Enable with --tls-enable or specify a HTTP address") } - if cfg.AccessURL.String() != "" && cfg.AccessURL.Scheme == "" { + if cfg.AccessURL.String() != "" && + !(cfg.AccessURL.Scheme == "http" || cfg.AccessURL.Scheme == "https") { return xerrors.Errorf("access-url must include a scheme (e.g. 'http://' or 'https://)") }