Open suedama1756 opened 10 years ago
I encountered to the same problem. some websites does not work without setting the right host. For example, Google appspot.
The options.headers is somewhat not documented. (took me hours to figure out how to achieve this without changing the source ode.)
in common.js setupOutgoing()
if (options.headers){
extend(outgoing.headers, options.headers);
}
So my fix is:
proxy.web(req, res, {
headers : {
host : 'sth.appspot.com'
}
, target: 'http://sth.appspot.com'
});
I just ran into this too. Deleting req.headers.host
worked in my case too.
Would this node-http-proxy work on a hosted and shared Google drive just like you can host websites from GD nowadays?
Thanks for any input! This may be what I'm looking for.
Please see this as examples
or
Thanks guys Hi5
also I guess I should fork my own to be able to tweak etc..
When passing a request through the proxy via proxy.web() the original "source" host header is copied into the proxyReq. This is incorrect behavior.
For reference: http://www.mnot.net/blog/2011/07/11/what_proxies_must_do