diff options
Diffstat (limited to 'internal/config/config.go')
-rw-r--r-- | internal/config/config.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 5aa99de..41ad7cd 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -15,6 +15,7 @@ import ( "gitlab.com/gitlab-org/gitlab-shell/client" "gitlab.com/gitlab-org/gitlab-shell/internal/metrics" + "gitlab.com/gitlab-org/labkit/log" ) const ( @@ -97,14 +98,18 @@ func (c *Config) ApplyGlobalState() { func (c *Config) HttpClient() *client.HttpClient { c.httpClientOnce.Do(func() { - client := client.NewHTTPClient( + client, err := client.NewHTTPClientWithOpts( c.GitlabUrl, c.GitlabRelativeURLRoot, c.HttpSettings.CaFile, c.HttpSettings.CaPath, c.HttpSettings.SelfSignedCert, c.HttpSettings.ReadTimeoutSeconds, + nil, ) + if err != nil { + log.WithError(err).Fatal("new http client with opts") + } tr := client.Transport client.Transport = promhttp.InstrumentRoundTripperDuration(metrics.HttpRequestDuration, tr) |