-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.d.ts
33 lines (33 loc) · 894 Bytes
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* Options when initializing the middleware.
*/
export interface AbuseCheckOptions {
/**
* Whether abuse points should be tracked by IP address.
*/
byIP: boolean;
/**
* Whether abuse points should be tracked by the X-Forwarded-For header.
*/
byXForwardedFor: boolean;
/**
* The message to appear when a user is blocked for abuse.
*/
abuseMessageText: string;
/**
* The default number of points assigned to an abuse event.
*/
abusePoints: number;
/**
* The default number of milliseconds an abuse record is enforced before expiring.
*/
expiryMillis: number;
/**
* The total number of points a user can accumulate before being blocked.
*/
abusePointsMax: number;
/**
* The frequency the memory is cleared of expired abuse records.
*/
clearIntervalMillis: number;
}