Skip to content

Commit

Permalink
Revert "[proxyUrl] pass URL parameters to proxied URL"
Browse files Browse the repository at this point in the history
  • Loading branch information
larkin authored and akhenry committed Sep 22, 2016
1 parent 2e81550 commit d77922d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand Down

0 comments on commit d77922d

Please sign in to comment.