req.ips
如果启用了 sails.config.http.trustProxy,则此变量包含此请求的“X-Forwarded-For”标头中的 IP 地址,以 IP 地址字符串数组的形式。否则返回一个空数组。
req.ips;
如果请求包含一个标头,“X-Forwarded-For: client, proxy1, proxy2”
req.ips;
// -> ["client", "proxy1", "proxy2"]`
// ("proxy2" is the furthest "down-stream" IP address)