Expand description
Header-name redaction list applied to network.json by default (and to
any tool-originated log line). Per design.md §"Secrets are redacted",
credential-bearing headers are replaced with "[redacted]" unless the
caller passes --no-network-redact.
Server response bodies pass through unmodified — redaction is for tool-captured metadata only.
Constants§
- ALWAYS_
REDACTED - Header names that are always redacted (case-insensitive match).
- REDACTED_
SUFFIXES - Header-name suffixes that trigger redaction (case-insensitive match
against the full header). Catches
x-api-token,x-csrf-token,x-shared-secret, etc. - REDACTED_
VALUE - Sentinel string written in place of redacted values.
- URL_
SECRET_ NAMES - Legacy/common URL query parameter names that carry credentials but cannot be renamed by afhttp because they belong to third-party sites.
Functions§
- redact_
url - Redact credentials from one URL, including userinfo and common third-party query parameter names.
- redact_
url_ fields - Redact third-party credential parameters only inside
_url/_URLfields. - redact_
userinfo_ passwords - Mask the password component of every
scheme://user:pass@hostuserinfo found in arbitrary text, leaving the rest byte-for-byte intact. - redact_
value - Apply afhttp’s URL compatibility policy followed by standard AFDATA value redaction.
- should_
redact - Returns true if
header_nameshould be redacted under the default policy. Case-insensitive.