From 11a930e77980a0bee661f3022cc66ac8020fc63b Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Thu, 9 Mar 2023 21:37:19 -0600 Subject: [PATCH] !fix: Disallow access urls without valid scheme (#6548) Existing deployments will need to prepend a scheme if they have not already. --- cli/server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/server.go b/cli/server.go index 94f4188aa2..26c5b39076 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://)") }