0.0.41 • Published 6 months ago
@types/request-ip v0.0.41
Installation
npm install --save @types/request-ip
Summary
This package contains type definitions for request-ip (https://github.com/pbojinov/request-ip).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/request-ip.
index.d.ts
// Type definitions for request-ip
// Project: https://github.com/pbojinov/request-ip
// Definitions by: Adam Babcock <https://github.com/mrhen>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="node" />
import * as http from 'http';
interface RequestHeaders extends http.IncomingHttpHeaders {
'x-client-ip'?: string | undefined;
'x-forwarded-for'?: string | undefined;
'x-real-ip'?: string | undefined;
'x-cluster-client-ip'?: string | undefined;
'x-forwarded'?: string | undefined;
'forwarded-for'?: string | undefined;
'forwarded'?: string | undefined;
}
interface Request {
headers: RequestHeaders;
connection?: {
remoteAddress?: string | undefined;
socket?: {
remoteAddress?: string | undefined
} | undefined;
} | undefined;
info?: {
remoteAddress?: string | undefined
} | undefined;
socket?: {
remoteAddress?: string | undefined
} | undefined;
}
interface Options {
attributeName: string;
}
export declare function getClientIp(req: Request): string | null;
export function mw(options?: Options): (req: Request, res: any, next: any) => any;
declare global {
namespace Express {
interface Request {
clientIp?: string | undefined;
}
}
}
Additional Details
- Last updated: Wed, 07 Jul 2021 18:02:23 GMT
- Dependencies: @types/node
- Global values: none
Credits
These definitions were written by Adam Babcock.
0.0.40
6 months ago
0.0.41
6 months ago
0.0.39
7 months ago
0.0.38
11 months ago
0.0.37
3 years ago
0.0.36
3 years ago
0.0.35
4 years ago
0.0.34
5 years ago
0.0.33
6 years ago
0.0.32
7 years ago
0.0.31
8 years ago
0.0.30
8 years ago
0.0.29
8 years ago
0.0.28
8 years ago
0.0.27
8 years ago
0.0.26-alpha
8 years ago
0.0.25-alpha
8 years ago
0.0.24-alpha
8 years ago
0.0.23-alpha
8 years ago
0.0.22-alpha
8 years ago
0.0.21-alpha
8 years ago
0.0.20-alpha
8 years ago
0.0.15-alpha
8 years ago
0.0.14-alpha
8 years ago