get-user-ip
Version:
一个轻量、小巧的Node.js模块,用于检索请求用户的IP地址 | A lightweight, small Node.js module to retrieve the IP address of the requesting user
12 lines (9 loc) • 365 B
TypeScript
import { IncomingMessage } from 'http'
/**
* Obtain real IP address of the client
* @param req Request Object
* @param headers [Options] Custom Obtain Request Object Headers Info
* @returns IP - If not, it is returned by default '0.0.0.0'
*/
export function get_client_ip(req: IncomingMessage, headers?: string[]): string
export { get_client_ip as default }