req.ipThe IP address of the client who sent this request (req).
Note:
If your Sails app is deployed behind a proxy (on Heroku, for example), then you'll need to do a bit of additional configuration. Normally,
req.ipis simply the "remote address"—the IP address of the requesting user agent. But if the sails.config.http.trustProxy option is enabled, this is the "upstream address".
req.ip;
req.ip;
// -> "127.0.0.1"
If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.