Skip to content

Commit

Permalink
Update http.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth authored Oct 11, 2017
1 parent f8dbe3b commit fa76a63
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,14 @@ HttpClient.prototype.buildRequest = function(rurl, data, exheaders, exoptions) {
uri: curl,
method: method,
headers: headers,
followAllRedirects: true,
proxy : process.env.TOURICO_PROXY ? url.parse(process.env.TOURICO_PROXY) : url.parse(process.env.FIXIE_URL)
followAllRedirects: true
};

if (process.env.TOURICO_PROXY) {
options.proxy = url.parse(process.env.TOURICO_PROXY)
} else if (process.env.FIXIE_URL) {
options.proxy = url.parse(process.env.FIXIE_URL)
}

if (headers.Connection === 'keep-alive') {
options.body = data;
Expand Down

0 comments on commit fa76a63

Please sign in to comment.