Skip to content

Commit

Permalink
Readability
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan committed May 11, 2022
1 parent 26d2d2a commit da07084
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,8 @@ export const getRequestInfo = (
if (!pathname && optionsParsed.path) {
pathname = url.parse(optionsParsed.path).pathname || '/';
}
origin = `${optionsParsed.protocol || 'http:'}//${
optionsParsed.host ||
optionsParsed.port != null ? `${optionsParsed.hostname}${optionsParsed.port}` : optionsParsed.hostname
}`;
const hostname = optionsParsed.host || (optionsParsed.port != null ? `${optionsParsed.hostname}${optionsParsed.port}` : optionsParsed.hostname)
origin = `${optionsParsed.protocol || 'http:'}//${hostname}`;
}

const headers = optionsParsed.headers ?? {};
Expand Down

0 comments on commit da07084

Please sign in to comment.