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:
authorfeistel <6742251-feistel@users.noreply.gitlab.com>2022-06-05 02:18:05 +0300
committerfeistel <6742251-feistel@users.noreply.gitlab.com>2022-06-05 02:18:05 +0300
commitde6358229b0c5c18839e0dec9657373186d45b72 (patch)
tree4868c0924658e787b2337a655887e84f5370827c /app.go
parentfd62cfc0771c627bd1bda001fd1fa71178dd447b (diff)
Propagate context during certificate retrieval
Diffstat (limited to 'app.go')
-rw-r--r--app.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/app.go b/app.go
index 6ce414a4..7fa3dde8 100644
--- a/app.go
+++ b/app.go
@@ -64,7 +64,7 @@ func (a *theApp) GetCertificate(ch *cryptotls.ClientHelloInfo) (*cryptotls.Certi
return nil, nil
}
- if domain, _ := a.domain(context.Background(), ch.ServerName); domain != nil {
+ if domain, _ := a.source.GetDomain(ch.Context(), ch.ServerName); domain != nil {
certificate, _ := domain.EnsureCertificate()
return certificate, nil
}
@@ -86,10 +86,6 @@ func (a *theApp) getTLSConfig() (*cryptotls.Config, error) {
return a.tlsConfig, err
}
-func (a *theApp) domain(ctx context.Context, host string) (*domain.Domain, error) {
- return a.source.GetDomain(ctx, host)
-}
-
// serveFileOrNotFoundHandler will serve static content or
// return a 404 Not Found response
func (a *theApp) serveFileOrNotFoundHandler() http.Handler {