1
0
mirror of https://github.com/go-acme/lego.git synced 2025-11-30 17:15:18 +02:00

feat(cli): add LEGO_DEBUG_ACME_HTTP_CLIENT to debug the calls to the ACME server (#2420)

This commit is contained in:
Ludovic Fernandez
2025-02-04 13:43:51 +01:00
committed by GitHub
parent dc992b8d87
commit 7cd008e80a
6 changed files with 19 additions and 3 deletions

View File

@@ -71,6 +71,10 @@ func newClient(ctx *cli.Context, acc registration.User, keyType certcrypto.KeyTy
retryClient.HTTPClient = config.HTTPClient
retryClient.Logger = nil
if _, v := os.LookupEnv("LEGO_DEBUG_ACME_HTTP_CLIENT"); v {
retryClient.Logger = log.Logger
}
config.HTTPClient = retryClient.StandardClient()
client, err := lego.NewClient(config)