diff options
author | Igor <iwiedler@gitlab.com> | 2020-07-02 12:43:46 +0300 |
---|---|---|
committer | Alessio Caiazza <acaiazza@gitlab.com> | 2020-07-02 12:43:46 +0300 |
commit | cce0e98799eab450dd7d12b9e9180d0d37084c13 (patch) | |
tree | 4bb3b201c30abbc574cd3e2e1fe1443740d47907 /main.go | |
parent | 16a5f6937c067c541eb0ecc8b6a6879ea6c0cb60 (diff) |
fix default value for gitlab-server to include scheme and port
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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 { |