URL interceptor
URL interceptors can obscure sensitive data from URLs, such as tokens. For URL interceptors, the URL is the URL of the page the user is visiting.
URL events can't be filtered out of the recording.
Example URL interceptor
{
interceptors: {
url: (data) => {
const tokenIndex = data.url.indexOf('tokenId=');
if (tokenIndex > -1) {
data.url = data.url.slice(0, tokenIndex) + 'tokenId=[OBSCURED]';
}
}
}
Parameters
Parameter | Type | Description |
---|---|---|
data | object | Contains the URL |
data.url | string | URL of the page the user is visiting |
context | Undefined |
Validation
The URL is undergoing validation via the URL() constructor.
Updated 7 months ago