File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { IPMatcher } from "../helpers/ip-matcher/IPMatcher";
22import { LimitedContext , matchEndpoints } from "../helpers/matchEndpoints" ;
33import { isPrivateIP } from "../vulnerabilities/ssrf/isPrivateIP" ;
44import type { Endpoint , EndpointConfig } from "./Config" ;
5- import { AgentBlockList , IPList } from "./api/fetchBlockedLists" ;
5+ import { BotBlocklist , IPList } from "./api/fetchBlockedLists" ;
66
77export 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
Original file line number Diff line number Diff 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 = {
1919export type Response = {
2020 blockedIPAddresses : IPList [ ] ;
2121 allowedIPAddresses : IPList [ ] ;
22- blockedUserAgents : AgentBlockList [ ] ;
22+ blockedUserAgents : BotBlocklist [ ] ;
2323} ;
2424
2525export async function fetchBlockedLists ( token : Token ) : Promise < Response > {
You can’t perform that action at this time.
0 commit comments