Created
August 16, 2017 12:14
-
-
Save mrspartak/749f9aedb12ea0c8022d25c4f94847f6 to your computer and use it in GitHub Desktop.
Track requests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //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