aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--cmd/commandfuncs.go2
-rw-r--r--modules/caddyhttp/autohttps.go2
-rw-r--r--modules/caddytls/tls.go4
3 files changed, 6 insertions, 2 deletions
diff --git a/cmd/commandfuncs.go b/cmd/commandfuncs.go
index 50e9b110d..a5c357cd7 100644
--- a/cmd/commandfuncs.go
+++ b/cmd/commandfuncs.go
@@ -716,7 +716,7 @@ func AdminAPIRequest(adminAddr, method, uri string, headers http.Header, body io
// if it didn't work, let the user know
if resp.StatusCode >= 400 {
- respBody, err := io.ReadAll(io.LimitReader(resp.Body, 1024*10))
+ respBody, err := io.ReadAll(io.LimitReader(resp.Body, 1024*1024*2))
if err != nil {
return nil, fmt.Errorf("HTTP %d: reading error message: %v", resp.StatusCode, err)
}
diff --git a/modules/caddyhttp/autohttps.go b/modules/caddyhttp/autohttps.go
index ea5a07b3c..79fdfd6ec 100644
--- a/modules/caddyhttp/autohttps.go
+++ b/modules/caddyhttp/autohttps.go
@@ -732,7 +732,7 @@ func (app *App) automaticHTTPSPhase2() error {
)
err := app.tlsApp.Manage(app.allCertDomains)
if err != nil {
- return fmt.Errorf("managing certificates for %v: %s", app.allCertDomains, err)
+ return fmt.Errorf("managing certificates for %d domains: %s", len(app.allCertDomains), err)
}
app.allCertDomains = nil // no longer needed; allow GC to deallocate
return nil
diff --git a/modules/caddytls/tls.go b/modules/caddytls/tls.go
index 5f3d0eaeb..f04beb2ee 100644
--- a/modules/caddytls/tls.go
+++ b/modules/caddytls/tls.go
@@ -447,6 +447,10 @@ func (t *TLS) Manage(names []string) error {
for ap, names := range policyToNames {
err := ap.magic.ManageAsync(t.ctx.Context, names)
if err != nil {
+ const maxNamesToDisplay = 100
+ if len(names) > maxNamesToDisplay {
+ names = append(names[:maxNamesToDisplay], fmt.Sprintf("(%d more...)", len(names)-maxNamesToDisplay))
+ }
return fmt.Errorf("automate: manage %v: %v", names, err)
}
for _, name := range names {