ipn/localapi: refresh ACME certs in background two weeks in advance

Updates #1235

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2021-08-18 12:55:29 -07:00
parent 6f8c8c771b
commit 56db3e2548
2 changed files with 70 additions and 26 deletions

View File

@@ -57,12 +57,6 @@ type Handler struct {
b *ipnlocal.LocalBackend
logf logger.Logf
backendLogID string
// certMu guards all cert/ACME operations, so concurrent
// requests for certs don't slam ACME. The first will go
// through and populate the on-disk cache and the rest should
// use that.
certMu sync.Mutex
}
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {