diff options
author | Igor Drozdov <idrozdov@gitlab.com> | 2019-04-25 10:19:34 +0300 |
---|---|---|
committer | Igor Drozdov <idrozdov@gitlab.com> | 2019-05-01 14:51:39 +0300 |
commit | 8886eb709e290baa6f526dffffe8de9bd4badbbb (patch) | |
tree | 8201cdfb5e9d51bc73c99c6a4181d30fa03ad1ac /go/internal/config/config.go | |
parent | 344cc6b443e08ec5648fcf8a3035e46bb404fd6a (diff) | |
download | gitlab-shell-id-api-https.tar.gz |
Support calling internal API using HTTPSid-api-https
Diffstat (limited to 'go/internal/config/config.go')
-rw-r--r-- | go/internal/config/config.go | 8 |
1 files changed, 3 insertions, 5 deletions
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 |