Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface FilterField {
* If your code needs to support custom fields, introduce a second parameter to
* `parseFiltersMap` to take a list of FilterField objects.
*/
const filterWhitelist: FilterField[] = [
const filterAllowList: FilterField[] = [
{ name: 'ports', fieldName: 'url.port' },
{ name: 'locations', fieldName: 'observer.geo.name' },
{ name: 'tags', fieldName: 'tags' },
Expand All @@ -28,7 +28,7 @@ export const parseFiltersMap = (filterMapString: string) => {
const filterSlices: { [key: string]: any } = {};
try {
const map = new Map<string, string[]>(JSON.parse(filterMapString));
filterWhitelist.forEach(({ name, fieldName }) => {
filterAllowList.forEach(({ name, fieldName }) => {
filterSlices[name] = map.get(fieldName) ?? [];
});
return filterSlices;
Expand Down