iwf
    Preparing search index...

    Function redactHeaders

    • Redacts sensitive information from headers

      Parameters

      • headers: Record<string, string>

        The headers to redact

      Returns Record<string, string>

      The redacted headers

      const headers = {
      'Authorization': 'Bearer token123',
      'Content-Type': 'application/json',
      'Cookie': 'sessionid=abc123'
      };
      const redacted = redactHeaders(headers);
      // redacted = {
      'Authorization': '[REDACTED]',
      'Content-Type': 'application/json',
      'Cookie': '[REDACTED]'
      };