kinetex - v1.0.0-rc.1
    Preparing search index...

    Class Redactor

    Redacts sensitive data from headers, URLs, and request/response bodies before they are written to log output.

    Index

    Constructors

    Methods

    • Redact sensitive header values, replacing them with "***".

      Parameters

      • headers: Record<string, string>

      Returns Record<string, string>

    • Redact sensitive query parameters from a URL.

      Parameters

      • url: string

      Returns string

    • Redact and optionally truncate a request or response body.

      Parameters

      • body: string | Uint8Array<ArrayBufferLike> | null
      • contentType: string | null
      • isResponse: boolean

      Returns { body: string | null; size: number | null }

      An object containing body (the redacted/truncated body string, or null) and size (the original byte size, or null).

      • body: string | null

        The redacted/truncated body string, or null.

      • size: number | null

        The original byte size, or null.