nodejitsu/node-http-proxy — Issue #177: Reverse proxying Google Maps does not work with http-proxy
Author: InspiredJW
Created: 2012-01-14 14:16:29+00:00
State: open

ex) http://maps.google.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=true

With Nginx,

location /geocode {
proxy_pass http://maps.google.com/maps/api/geocode
}

Works nicely.

But somehow with node-http-proxy,

httpProxy.createServer({
router: {
'localhost/geocode': 'maps.google.com/maps/api/geocode'
}
}).listen(80);

Does not work.

I guess Nginx and node-http-proxy handles header differently :( ex) X-Forwarded-For, Referer and etc.

I want to use node-http-proxy :) instead of nginx to make this work.

Would you take some time to change header values when reverse proxying?