-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
45 lines (36 loc) · 900 Bytes
/
types.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
34
35
36
37
38
39
40
41
42
43
44
45
/**
* Options when initializing the middleware.
*/
export interface AbuseCheckOptions {
// TRACKING TYPES
/**
* 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
// DEFAULT VALUES
/**
* 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
// ADMINISTRATION
/**
* 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
}