Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example in readme broken #335

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

example in readme broken #335

catphive opened this issue Nov 17, 2012 · 1 comment

Comments

@catphive
Copy link

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
Copy link
Contributor

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().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants