diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2022-06-23 06:24:13 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2022-06-23 06:24:13 +0300 |
commit | 947cad46a79aa89323fd10f6d9f2bc16c1f6741d (patch) | |
tree | 6eac40676216f7b39adf66da5c355a8fe4e6c01b /app.go | |
parent | 3fb57b7a2989b50ca4c9543ec86c1f5751cf1a41 (diff) | |
parent | de6358229b0c5c18839e0dec9657373186d45b72 (diff) |
Merge branch 'fix/get-certificate-ctx' into 'master'
fix: propagate context during certificate retrieval
See merge request gitlab-org/gitlab-pages!777
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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 { |