@@ -23,19 +23,11 @@ t.beforeEach(async () => {
2323 body : JSON . stringify ( {
2424 blockedIPAddresses : [ ] ,
2525 monitoredIPAddresses : [ "1.3.2.0/24" , "e98c:a7ba:2329:8c69::/64" ] ,
26- monitoredUserAgents : "suspicious-bot| monitored-crawler|GPTBot " ,
26+ monitoredUserAgents : "monitored-bot " ,
2727 userAgentDetails : [
2828 {
29- key : "suspicious-bot" ,
30- pattern : "suspicious-bot" ,
31- } ,
32- {
33- key : "monitored-crawler" ,
34- pattern : "monitored-crawler" ,
35- } ,
36- {
37- key : "gpt-bot" ,
38- pattern : "GPTBot" ,
29+ key : "monitored-bot" ,
30+ pattern : "monitored-bot" ,
3931 } ,
4032 ] ,
4133 } ) ,
@@ -144,30 +136,11 @@ t.test("it does not block monitored user agents", (t) => {
144136 // Test monitored user agent
145137 const resp1 = await fetch ( "http://127.0.0.1:4006/" , {
146138 headers : {
147- "User-Agent" : "suspicious -bot" ,
139+ "User-Agent" : "monitored -bot" ,
148140 } ,
149141 signal : AbortSignal . timeout ( 5000 ) ,
150142 } ) ;
151143 t . same ( resp1 . status , 200 ) ;
152-
153- // Test monitored GPT bot
154- const resp2 = await fetch ( "http://127.0.0.1:4006/" , {
155- headers : {
156- "User-Agent" :
157- "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; GPTBot/1.1; +https://openai.com/gptbot" ,
158- } ,
159- signal : AbortSignal . timeout ( 5000 ) ,
160- } ) ;
161- t . same ( resp2 . status , 200 ) ;
162-
163- // Test monitored crawler
164- const resp3 = await fetch ( "http://127.0.0.1:4006/" , {
165- headers : {
166- "User-Agent" : "monitored-crawler/1.0" ,
167- } ,
168- signal : AbortSignal . timeout ( 5000 ) ,
169- } ) ;
170- t . same ( resp3 . status , 200 ) ;
171144 } )
172145 . catch ( ( error ) => {
173146 t . fail ( error ) ;
0 commit comments