We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
var http = require('http'); var server = http.createServer(); server.on("request", function () { var proxyRequest = http.request({ host:request.headers['host'], path:request.url(), method:request.method, headers: request.headers }, function(proxyResponse){ reponse.writeHead(proxyResponse.statusCode, proxyResponse.headers); proxyResponse.pipe(response); }); request.pipe(proxyRequest); }) server.listen(8080);