forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
request-ip.d.ts
32 lines (30 loc) · 891 Bytes
/
request-ip.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
// Type definitions for request-ip
// Project: https://github.com/pbojinov/request-ip
// Definitions by: Adam Babcock <https://github.com/mrhen>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "request-ip" {
interface Request {
headers: {
'x-client-ip'?: string;
'x-forwarded-for'?: string;
'x-real-ip'?: string;
'x-cluster-client-ip'?: string;
'x-forwarded'?: string;
'forwarded-for'?: string;
'forwarded'?: string;
};
connection: {
remoteAddress?: string;
socket?: {
remoteAddress?: string
};
};
info?: {
remoteAddress?: string
};
socket?: {
remoteAddress?: string
};
}
export function getClientIp(req:Request):string;
}