sanitizeHeader

fun sanitizeHeader(placeholder: String = "***", predicate: (String) -> Boolean)

Allows you to sanitize sensitive headers to avoid their values appearing in the logs. In the example below, Authorization header value will be replaced with '***' when logging:

sanitizeHeader { header -> header == HttpHeaders.Authorization }