Skip to content

Instantly share code, notes, and snippets.

@hink
Created July 17, 2012 22:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hink/3132587 to your computer and use it in GitHub Desktop.
Save hink/3132587 to your computer and use it in GitHub Desktop.
var getIpData;
getIpData = function(req, res, next) {
var o;
o = {};
if (req.params.host != null) {
o.ip = req.params.host;
if (!isIp(o.ip)) {
o.error = 'Invalid IP Address';
req.ipData = o;
next();
}
} else {
o.ip = determineIp(req);
}
return async.parallel([
function(callback) {...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment