Skip to content

Commit 519a39d

Browse files
committed
Rename AgentBlocklist to BotBlocklist
1 parent 7a59939 commit 519a39d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

library/agent/ServiceConfig.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { IPMatcher } from "../helpers/ip-matcher/IPMatcher";
22
import { LimitedContext, matchEndpoints } from "../helpers/matchEndpoints";
33
import { isPrivateIP } from "../vulnerabilities/ssrf/isPrivateIP";
44
import type { Endpoint, EndpointConfig } from "./Config";
5-
import { AgentBlockList, IPList } from "./api/fetchBlockedLists";
5+
import { BotBlocklist, IPList } from "./api/fetchBlockedLists";
66

77
export class ServiceConfig {
88
private blockedUserIds: Map<string, string> = new Map();
@@ -144,7 +144,7 @@ export class ServiceConfig {
144144
this.setBlockedIPAddresses(blockedIPAddresses);
145145
}
146146

147-
private setBlockedUserAgents(blockedUserAgents: AgentBlockList[]) {
147+
private setBlockedUserAgents(blockedUserAgents: BotBlocklist[]) {
148148
this.blockedUserAgents = [];
149149

150150
for (const list of blockedUserAgents) {
@@ -162,7 +162,7 @@ export class ServiceConfig {
162162
}
163163
}
164164

165-
updateBlockedUserAgents(blockedUserAgents: AgentBlockList[]) {
165+
updateBlockedUserAgents(blockedUserAgents: BotBlocklist[]) {
166166
this.setBlockedUserAgents(blockedUserAgents);
167167
}
168168

library/agent/api/fetchBlockedLists.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export type IPList = {
1010
monitor: boolean;
1111
};
1212

13-
export type AgentBlockList = {
13+
export type BotBlocklist = {
1414
key: string;
1515
pattern: string; // e.g. "Googlebot|Bingbot"
1616
monitor: boolean;
@@ -19,7 +19,7 @@ export type AgentBlockList = {
1919
export type Response = {
2020
blockedIPAddresses: IPList[];
2121
allowedIPAddresses: IPList[];
22-
blockedUserAgents: AgentBlockList[];
22+
blockedUserAgents: BotBlocklist[];
2323
};
2424

2525
export async function fetchBlockedLists(token: Token): Promise<Response> {

0 commit comments

Comments
 (0)