Protect sensitive data by selectively redacting form fields and content during session recording
setRedactedFields
function. This allows you to dynamically update redaction rules as your application state changes:
redact
function with advanced options:
Property/Option | Type | Description |
---|---|---|
redactFields | string[] | CSS selectors for fields to redact during initialization. |
setRedactedFields() | function | Set CSS selectors for fields to redact. |
redact() | function | Start redaction with advanced configuration options. |
isRedactionActive() | function | Check if redaction is currently active. |
getRedactedFields() | function | Get the currently selected fields for redaction. |
redact(options)
fields:
Option | Type | Description |
---|---|---|
redactedText | string | Custom text to use for redaction (default: ‘[REDACTED]’). |
excludeSelectors | string[] | CSS selectors to exclude from redaction. |
userFields | string[] | Additional fields to redact. |
Selector | Description |
---|---|
input[type="password"] | All password input fields. |
input[type="email"] | Email input fields. |
#credit-card | Credit card number field. |
.sensitive-data | Elements with sensitive-data class. |
[data-sensitive="true"] | Elements with data-sensitive attribute. |