autocert: fix bootstrapped cache store path (#1283) (#1291)

Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>

Co-authored-by: bobby <1544881+desimone@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2020-08-17 15:27:34 -07:00 committed by GitHub
parent 8dbfa3a2dc
commit 95f9e94bea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,6 +30,12 @@ type Manager struct {
// New creates a new autocert manager.
func New(src config.Source) (*Manager, error) {
// set certmagic default storage cache, otherwise cert renewal loop will be based off
// certmagic's own default location
certmagic.Default.Storage = &certmagic.FileStorage{
Path: src.GetConfig().Options.AutocertOptions.Folder,
}
mgr := &Manager{
src: src,
certmagic: certmagic.NewDefault(),