From 8886eb709e290baa6f526dffffe8de9bd4badbbb Mon Sep 17 00:00:00 2001 From: Igor Drozdov Date: Thu, 25 Apr 2019 10:19:34 +0300 Subject: Support calling internal API using HTTPS --- go/internal/config/config.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'go/internal/config/config.go') diff --git a/go/internal/config/config.go b/go/internal/config/config.go index 6085493..d651744 100644 --- a/go/internal/config/config.go +++ b/go/internal/config/config.go @@ -6,7 +6,6 @@ import ( "os" "path" "path/filepath" - "strings" yaml "gopkg.in/yaml.v2" ) @@ -26,6 +25,9 @@ type HttpSettingsConfig struct { User string `yaml:"user"` Password string `yaml:"password"` ReadTimeoutSeconds uint64 `yaml:"read_timeout"` + CaFile string `yaml:"ca_file"` + CaPath string `yaml:"ca_path"` + SelfSignedCert bool `yaml:"self_signed_cert"` } type Config struct { @@ -59,10 +61,6 @@ func (c *Config) FeatureEnabled(featureName string) bool { return false } - if !strings.HasPrefix(c.GitlabUrl, "http+unix://") && !strings.HasPrefix(c.GitlabUrl, "http://") { - return false - } - for _, enabledFeature := range c.Migration.Features { if enabledFeature == featureName { return true -- cgit v1.2.1