diff --git a/lib/caronte/passes/web.js b/lib/caronte/passes/web.js index 363d8ff..33da585 100644 --- a/lib/caronte/passes/web.js +++ b/lib/caronte/passes/web.js @@ -91,8 +91,10 @@ function stream(req, res, options) { common.setupOutgoing(options.ssl || {}, options, req) ); + req.pipe(proxyReq); + proxyReq.on('response', function(proxyRes) { - req.pipe(proxyRes).pipe(res); + proxyRes.pipe(res); }); proxyReq.end();