The IP address of the client who sent this request (
trust proxyoption is disabled in Express, this is the "remote address". Otherwise, if
trust proxyis enabled, this is the "upstream address". See Express docs for app.set() - in Sails this can be accomplished by adding the line
sails.hooks.http.app.set('trust proxy', true);to
req.ip; // -> "127.0.0.1"