Skip to content

Commit

Permalink
Use hostname instead of host when creating request (#233)
Browse files Browse the repository at this point in the history
Host may contain ports which causes dns lookup failures.
  • Loading branch information
cjlpowers authored Mar 22, 2021
1 parent 329cec5 commit 2233ec8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wrappers/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ module.exports.default = (options) => {

return new Promise((resolve, reject) => {
const {
host,
hostname,
path,
port,
protocol
} = urlUtil.parse(options.uri);

const requestOptions = {
host,
hostname,
path,
port,
method: 'GET',
Expand Down

0 comments on commit 2233ec8

Please sign in to comment.