Bound every slog line against client-chosen text (closes #176)
All checks were successful
check / check (push) Successful in 2m55s
All checks were successful
check / check (push) Successful in 2m55s
This commit was merged in pull request #180.
This commit is contained in:
@@ -11,6 +11,17 @@ import (
|
||||
// inbound webhook — the full request body and headers, plus
|
||||
// the method, content type, and the webhook and entrypoint
|
||||
// ids — then records a single successful attempt.
|
||||
//
|
||||
// This is the one log call in the service that deliberately writes
|
||||
// unbounded client-chosen bytes, so it is the one exception to the
|
||||
// per-field budgets in internal/logfield and to the ceiling stated on
|
||||
// middleware.MaxAccessLogLineBytes. Capping here would defeat the
|
||||
// target: emitting the payload IS the delivery. It costs nothing by
|
||||
// default — an authenticated operator has to create a target of this
|
||||
// type on a specific webhook before a single line is written — and the
|
||||
// bytes it writes are bounded per event by maxWebhookBodySize (1 MB).
|
||||
// An operator who adds one is choosing to spend log volume on the
|
||||
// payloads that webhook receives.
|
||||
type logTarget struct {
|
||||
eng *Engine
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user