Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions packages/analytics-core/src/types/network-tracking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,47 @@ export interface NetworkCaptureRule {
* @defaultValue `["*"]` all hosts (except amplitude)
*/
hosts?: string[];
/**
* Paths to allow for network capture. Supports wildcard.
* @defaultValue `["*"]` all paths
*/
paths?: string[];
/**
* Properties on response JSON to allow capture of keys on response body JSON
*
* Keys can be defined as "<key>" or "<key>/<subkey>" to capture nested keys.
*/
allowResponseBodyKeys?: string[];
/**
* Properties on request JSON to allow capture of keys on request body JSON.
*
* Keys can be defined as "<key>" or "<key>/<subkey>" to capture nested keys.
*
*/
allowRequestBodyKeys?: string[];
/**
* Headers on response to allow capturing response headers.
*
* When "true", allow capture of all response headers except (case-insensitive):
* - "set-cookie"
* - "authorization"
*
* By default, no headers are allowed.
*/
allowResponseHeaders?: boolean | string[];
/**
* Headers on request to allow capturing request headers.
*
* When "true", allow capture of all request headers except (case-insensitive):
* - "authorization"
* - "cookie"
* - "x-api-key"
* - "x-csrf-token"
* - "set-cookie"
*
* By default, no headers are allowed.
*/
allowRequestHeaders?: boolean | string[];
/**
* Range list that defines the status codes to be captured.
* @defaultValue `500-599`
Expand Down
Loading