move file change detection before autocert (#1793)

This commit is contained in:
Caleb Doxsey 2021-01-20 16:01:43 -07:00 committed by GitHub
parent a4c7381eba
commit 0adb9e5dde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,14 +43,14 @@ func Run(ctx context.Context, configFile string) error {
logMgr := config.NewLogManager(src)
defer logMgr.Close()
// trigger changes when underlying files are changed
src = config.NewFileWatcherSource(src)
src, err = autocert.New(src)
if err != nil {
return err
}
// trigger changes when underlying files are changed
src = config.NewFileWatcherSource(src)
// override the default http transport so we can use the custom CA in the TLS client config (#1570)
http.DefaultTransport = config.NewHTTPTransport(src)