diff options
author | feistel <6742251-feistel@users.noreply.gitlab.com> | 2022-06-05 02:18:05 +0300 |
---|---|---|
committer | feistel <6742251-feistel@users.noreply.gitlab.com> | 2022-06-05 02:18:05 +0300 |
commit | de6358229b0c5c18839e0dec9657373186d45b72 (patch) | |
tree | 4868c0924658e787b2337a655887e84f5370827c /app.go | |
parent | fd62cfc0771c627bd1bda001fd1fa71178dd447b (diff) |
Propagate context during certificate retrieval
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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 { |