Package-level declarations
Types
Link copied to clipboard
class RedactionEngine(headerPredicates: List<(String) -> Boolean> = emptyList(), propertyPredicates: List<(String) -> Boolean> = emptyList(), queryParamPredicates: List<(String) -> Boolean> = emptyList(), bodyTransforms: List<(String) -> String> = emptyList(), placeholder: String = DEFAULT_PLACEHOLDER)
Replaces sensitive header/property values with a visible placeholder so the reader can see that a field exists without exposing its value, and runs the host's body transforms. Predicates are offered the name as captured and, when it differs, its lowercase form — HTTP/2 sends header names lowercase, so a rule written either way still matches. Defaults cover the usual auth headers and query parameters; the host adds more via the config DSL. A throwing predicate counts as a match (fail closed) — a broken host lambda must never leak a value.