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
diff options
context:
space:
mode:
authorJaime Martinez <jmartinez@gitlab.com>2022-06-23 06:24:13 +0300
committerJaime Martinez <jmartinez@gitlab.com>2022-06-23 06:24:13 +0300
commit947cad46a79aa89323fd10f6d9f2bc16c1f6741d (patch)
tree6eac40676216f7b39adf66da5c355a8fe4e6c01b
parent3fb57b7a2989b50ca4c9543ec86c1f5751cf1a41 (diff)
parentde6358229b0c5c18839e0dec9657373186d45b72 (diff)
Merge branch 'fix/get-certificate-ctx' into 'master'
fix: propagate context during certificate retrieval See merge request gitlab-org/gitlab-pages!777
-rw-r--r--app.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/app.go b/app.go
index c733668f..c08dfb29 100644
--- a/app.go
+++ b/app.go
@@ -62,7 +62,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
}
@@ -84,10 +84,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 {