Skip to content

Instantly share code, notes, and snippets.

@mrspartak
Created August 16, 2017 12:14
Show Gist options
  • Select an option

  • Save mrspartak/749f9aedb12ea0c8022d25c4f94847f6 to your computer and use it in GitHub Desktop.

Select an option

Save mrspartak/749f9aedb12ea0c8022d25c4f94847f6 to your computer and use it in GitHub Desktop.
Track requests
//add this lines before all code
const http = require('http');
const originalRequest = http.request;
http.request = function wrapMethodRequest(req) {
console.log('TRACKED', req.host);
return originalRequest.apply(this, arguments);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment