caddytls: correct documentation of LeafFolderLoader (#7327)

* caddytls: correct documentation of `LeafFolderLoader`

Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>

* fmt...

Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>

---------

Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
This commit is contained in:
Mohammed Al Sahaf
2025-11-01 18:29:55 +03:00
committed by GitHub
parent 92c8bc7322
commit ddec1838b3
2 changed files with 4 additions and 4 deletions

View File

@@ -29,9 +29,9 @@ func init() {
caddy.RegisterModule(LeafFolderLoader{})
}
// LeafFolderLoader loads certificates and their associated keys from disk
// LeafFolderLoader loads certificates from disk
// by recursively walking the specified directories, looking for PEM
// files which contain both a certificate and a key.
// files which contain a certificate.
type LeafFolderLoader struct {
Folders []string `json:"folders,omitempty"`
}

View File

@@ -404,12 +404,12 @@ func TestMultiRegexpFilterInputSizeLimit(t *testing.T) {
// Test with very large input (should be truncated)
largeInput := strings.Repeat("test", 300000) // Creates ~1.2MB string
out := f.Filter(zapcore.Field{String: largeInput})
// The input should be truncated to 1MB and still processed
if len(out.String) > 1000000 {
t.Fatalf("output string not truncated: length %d", len(out.String))
}
// Should still contain replacements within the truncated portion
if !strings.Contains(out.String, "REPLACED") {
t.Fatalf("replacements not applied to truncated input")