Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app.go
diff options
context:
space:
mode:
authorVishal Tak <vtak@gitlab.com>2022-06-01 15:59:58 +0300
committerVishal Tak <vtak@gitlab.com>2022-06-02 09:28:49 +0300
commit2624810f74b8ea239a02d09f5a21def3e1076fda (patch)
tree9bf58d9b73e17efdcc420eb4284ce7c12fa63fe4 /app.go
parent8488ef56611256c1761f93de5f8df23e07b86af4 (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.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/app.go b/app.go
index 7937e3fd..60d9acdb 100644
--- a/app.go
+++ b/app.go
@@ -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{