fuzzy-search-sanitizer-logrocket
Version:
Plugin for Logrocket to mask request/response bodies by designated field names
23 lines (22 loc) • 856 B
TypeScript
interface INetworkRequestResponse {
body?: any;
method: string;
headers: object;
}
export default class FuzzySearch {
static setup(fields: string[], excFieldsFrmSubstringMatch?: string[], isSubStringMatch?: boolean): {
requestSanitizer: (request: INetworkRequestResponse) => any;
responseSanitizer: (reponse: INetworkRequestResponse) => any;
};
fields: string[];
excFieldsFrmSubstringMatch?: string[];
isSubStringMatch?: boolean;
constructor(privateFields: string[], excFieldsFrmSubstringMatch?: string[], isSubStringMatch?: boolean);
requestSanitizer(request: INetworkRequestResponse): object | any;
responseSanitizer(reponse: INetworkRequestResponse): object | any;
private _networkHandler;
private _searchBody;
private _mask;
private _match;
}
export {};