We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
I wanted to handle the 'start' event from http-proxy with some code like this one:
var http = require('http'), httpProxy = require('http-proxy'); var server = httpProxy.createServer(function (req, res, proxy) { proxy.proxyRequest(req, res, { host: 'localhost', port: 8001 }); }) server.listen(8000); server.proxy.on('start',function(req, res, proxy){ console.log("Do something"); })
To make this work, I had to add to routing-proxy.js line 93:
this.proxies[key].on('start', this.emit.bind(this, 'start'));
I guess that the same should be done with other events (forward)
The text was updated successfully, but these errors were encountered:
Doesn't it work using http.createServer, like in the websocket example?
Sorry, something went wrong.
Hey, I just made a pull request that fixes this. See #216.
@gonzaloruizdevilla @desaintmartin can you test it again against the 0.8.1 version just released today. Should works now.
I've just seen it. Thank you!
No branches or pull requests
I wanted to handle the 'start' event from http-proxy with some code like this one:
To make this work, I had to add to routing-proxy.js line 93:
I guess that the same should be done with other events (forward)
The text was updated successfully, but these errors were encountered: