From cce0e98799eab450dd7d12b9e9180d0d37084c13 Mon Sep 17 00:00:00 2001 From: Igor Date: Thu, 2 Jul 2020 09:43:46 +0000 Subject: fix default value for gitlab-server to include scheme and port --- main.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 75578913..c5c2047d 100644 --- a/main.go +++ b/main.go @@ -15,7 +15,6 @@ import ( log "github.com/sirupsen/logrus" "gitlab.com/gitlab-org/labkit/errortracking" - "gitlab.com/gitlab-org/gitlab-pages/internal/host" "gitlab.com/gitlab-org/gitlab-pages/internal/logging" "gitlab.com/gitlab-org/gitlab-pages/internal/request" "gitlab.com/gitlab-org/gitlab-pages/internal/tlsconfig" @@ -107,8 +106,13 @@ func gitlabServerFromFlags() string { return *gitLabAuthServer } - url, _ := url.Parse(*artifactsServer) - return host.FromString(url.Host) + u, err := url.Parse(*artifactsServer) + if err != nil { + return "" + } + + u.Path = "" + return u.String() } func internalGitLabServerFromFlags() string { -- cgit v1.2.3