Revert "[proxyUrl] pass URL parameters to proxied URL"

This commit is contained in:
Pete Richards 2016-09-15 09:37:11 -07:00 committed by Henry
parent 2e81550c86
commit d77922d66c

10
app.js
View File

@ -67,14 +67,10 @@
});
app.use('/proxyUrl', function proxyRequest(req, res, next) {
var targetUrl = req.query.url;
var queryParameters = req.query;
console.log('Proxying request to: ', targetUrl);
delete queryParameters['url'];
console.log('Proxying request to: ', req.query.url);
req.pipe(request({
url: targetUrl,
strictSSL: false,
qs: queryParameters
url: req.query.url,
strictSSL: false
}).on('error', next)).pipe(res);
});