example in readme broken #335

Closed
catphive opened this Issue Nov 17, 2012 · 1 comment

Projects

None yet

2 participants

@catphive

Some of the examples in the readme show proxyRequest taking some options, when actually proxyRequest's last argument appears to be a buffer object. This code in particular doesn't seem to work:

httpProxy.createServer(function (req, res, proxy) {
  //
  // Put your custom server logic here
  //
  proxy.proxyRequest(req, res, {
    host: 'localhost',
    port: 9000
  });
}).listen(8000);
@indexzero
nodejitsu member

This is the correct method signature for a RoutingProxy, which is what is passed to the handler when no options (e.g. host and port) are passed to httpProxy.createServer().

@indexzero indexzero closed this Mar 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment