Skip to content

Commit

Permalink
the monkies are comming
Browse files Browse the repository at this point in the history
  • Loading branch information
graphtheory authored Jul 27, 2017
1 parent 9a9ab25 commit 70e7490
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/node-http-proxy/proxy-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,15 @@ ProxyTable.prototype.getProxyLocation = function (req) {
//
if (validateRouteSource(route) && target.match(route.source.regexp)) {
req.url = url.format(target.replace(route.source.regexp, ''));

var protocol = route.target.url.protocol.replace(':', '');

if (route.target.url.port === '443') {
protocol = 'https';
}

return {
protocol: route.target.url.protocol.replace(':', ''),
protocol: protocol,
host: route.target.url.hostname,
port: route.target.url.port
|| (this.target.https ? 443 : 80)
Expand Down

0 comments on commit 70e7490

Please sign in to comment.