nodejitsu/node-http-proxy — Issue #150: can't handle www.host
Author: jmonster
Created: 2011-11-08 18:04:59+00:00
State: open

Suppose I wanted to proxy a site like cb2.com -- visiting this site, you'll see that it immediately redirects you to www.cb2.com. This is a problem, as I'm unable to proxy the content of the site as my browser begins accessing www.cb2.com directly instead of continuing to proxy via localhost.

I've tried simply setting the host to be www.cb2.com instead of cb2.com, but it fails. No errors, the browser just waits.

proxy.proxyRequest(req, res, {
host: 'www.cb2.com',
port: 80
});