You're viewing a comment by Elmer Bulthuis and its responses.

Elmer Bulthuis Permalink
September 25, 2012, 15:54

i proxy like this:

function serveProxy(host, port, url, req, res){
	var proxy = http.createClient(port, host);
	var proxy_req = proxy.request(req.method, url, req.headers);
	proxy_req.addListener('response', function (proxy_res) {
		res.writeHead(proxy_res.statusCode, proxy_res.headers);

a little shorter!

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "browser_215": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.