diff options
author | Vishal Tak <vtak@gitlab.com> | 2022-06-03 11:41:14 +0300 |
---|---|---|
committer | Vishal Tak <vtak@gitlab.com> | 2022-06-03 11:41:14 +0300 |
commit | 1ddad1bd6ab55120e7862c61e033632b20e66d6f (patch) | |
tree | 793ddcea40dee1308727b74254d226af77a58de0 | |
parent | ff79d8bd21ce090619048e52cf06870e9e03e983 (diff) |
Remove IsHTTPS field
-rw-r--r-- | app.go | 2 | ||||
-rw-r--r-- | internal/config/config.go | 2 |
2 files changed, 1 insertions, 3 deletions
@@ -331,7 +331,7 @@ func (a *theApp) listenMetrics(eg *errgroup.Group, config cfg.Metrics) *http.Ser return fmt.Errorf("failed to listen on addr %s: %w", config.Address, err) } - if config.IsHTTPS { + if config.TLSConfig != nil { l = cryptotls.NewListener(l, config.TLSConfig) } diff --git a/internal/config/config.go b/internal/config/config.go index 46f5f26b..91ab019e 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -150,7 +150,6 @@ type Server struct { type Metrics struct { Address string - IsHTTPS bool TLSConfig *tls.Config } @@ -216,7 +215,6 @@ func loadMetricsConfig() (metrics Metrics, err error) { return metrics, err } - metrics.IsHTTPS = true metrics.TLSConfig = &tls.Config{ Certificates: []tls.Certificate{cert}, MinVersion: tls.VersionTLS12, |