UNPKG

posthog-js

Version:

Posthog-js allows you to automatically capture usage and send events to PostHog.

13 lines (12 loc) • 976 B
import { CapturedNetworkRequest, NetworkRecordOptions, PostHogConfig } from '../../../types'; export declare const MAX_PAYLOAD_SIZE_BYTES = 1000000; export declare function effectivePayloadLimitBytes(options: Pick<NetworkRecordOptions, 'payloadSizeLimitBytes'>): number; export declare const defaultNetworkOptions: Required<NetworkRecordOptions>; export declare const isInitialMaskFallback: (request: CapturedNetworkRequest | undefined) => boolean; /** * whether a maskRequestFn is provided or not, * we ensure that we remove the denied header from requests * we _never_ want to record that header by accident * if someone complains then we'll add an opt-in to let them override it */ export declare const buildNetworkRequestOptions: (instanceConfig: PostHogConfig, remoteNetworkOptions: Pick<NetworkRecordOptions, "recordHeaders" | "recordBody" | "recordPerformance" | "payloadHostDenyList">, isIngestionEndpoint?: (url: string) => boolean) => NetworkRecordOptions;