The getClientIp can return null (#41902)

As you can see in the source code here https://github.com/pbojinov/request-ip/blob/master/src/index.js#L129 the `getClientIp` function can return `null` value if all the possible methods fail.
This commit is contained in:
Łukasz Jagodziński 2020-02-04 17:53:37 +01:00 committed by GitHub
parent f3b9ae8270
commit 9264f705a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,7 @@ interface Options {
attributeName: string;
}
export declare function getClientIp(req: Request): string;
export declare function getClientIp(req: Request): string | null;
export function mw(options?: Options): (req: Request, res: any, next: any) => any;