iport
web服务中ip和port的统一公里工具类
取名
iport = ip + port
安装
npm install iport
用法
var http = ;var iport = ;var connect = ; var app = app; //按规则通知ip和port的获取app; var server = http; server;
讲解
- ip和port的获取规则: http headers -> http -> tcp
- headers的默认头信息
x-forwarded-for
和x-forwarded-for-port