File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -28,4 +28,5 @@ export type Config = {
2828 allowedIPAddresses : string [ ] ;
2929 block ?: boolean ;
3030 receivedAnyStats ?: boolean ;
31+ blockNewOutgoingRequests ?: boolean ;
3132} ;
Original file line number Diff line number Diff line change @@ -25,6 +25,12 @@ export type Response = {
2525 // If we want to collect stats about the individual user agents,
2626 // we can loop through the userAgentDetails and match each pattern.
2727 userAgentDetails : UserAgentDetails [ ] ;
28+ domains : Domain [ ] ;
29+ } ;
30+
31+ export type Domain = {
32+ hostname : string ;
33+ mode : "allow" | "block" ;
2834} ;
2935
3036export async function fetchBlockedLists ( token : Token ) : Promise < Response > {
@@ -56,6 +62,7 @@ export async function fetchBlockedLists(token: Token): Promise<Response> {
5662 blockedUserAgents : string ;
5763 monitoredUserAgents : string ;
5864 userAgentDetails : UserAgentDetails [ ] ;
65+ domains : Domain [ ] ;
5966 } = JSON . parse ( body ) ;
6067
6168 return {
@@ -85,5 +92,6 @@ export async function fetchBlockedLists(token: Token): Promise<Response> {
8592 result && Array . isArray ( result . userAgentDetails )
8693 ? result . userAgentDetails
8794 : [ ] ,
95+ domains : result && Array . isArray ( result . domains ) ? result . domains : [ ] ,
8896 } ;
8997}
You can’t perform that action at this time.
0 commit comments