diff options
author | Vishal Tak <vtak@gitlab.com> | 2022-06-01 15:59:58 +0300 |
---|---|---|
committer | Vishal Tak <vtak@gitlab.com> | 2022-06-02 09:28:49 +0300 |
commit | 2624810f74b8ea239a02d09f5a21def3e1076fda (patch) | |
tree | 9bf58d9b73e17efdcc420eb4284ce7c12fa63fe4 /app.go | |
parent | 8488ef56611256c1761f93de5f8df23e07b86af4 (diff) |
Use TLSConfig and remove IsHTTPS in Metrics config
Add unit tests and move acceptance tests
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -331,13 +331,8 @@ 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) } - metricsTLSConfig := &cryptotls.Config{ - Certificates: []cryptotls.Certificate{config.TLSCertificate}, - MinVersion: cryptotls.VersionTLS12, - } - - if config.IsHTTPS { - l = cryptotls.NewListener(l, metricsTLSConfig) + if config.IsHTTPS() { + l = cryptotls.NewListener(l, config.TLSConfig) } monitoringOpts := []monitoring.Option{ |