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 08:53:37 -08:00
committed by GitHub
parent f3b9ae8270
commit 9264f705a6
+1 -1
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;