Skip to content

Commit

Permalink
SNOW-1825719 - setting proxy port if default was skipped during parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-pmotacki committed Nov 25, 2024
1 parent 8cf07b0 commit dc8f7eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ exports.validateEmptyString = function (value) {
};

exports.getProxyFromEnv = function (isHttps = true) {
const getDeafaultPortIfNotSet = (proxyFromEnv, isHttps) => {
const getDefaultPortIfNotSet = (proxyFromEnv, isHttps) => {
if (!proxyFromEnv.port) {
return isHttps ? 443 : 80;
} else {
Expand All @@ -882,7 +882,7 @@ exports.getProxyFromEnv = function (isHttps = true) {
isHttps = false;
}
proxyFromEnv = new URL(proxyFromEnv);
const port = getDeafaultPortIfNotSet(proxyFromEnv, isHttps);
const port = getDefaultPortIfNotSet(proxyFromEnv, isHttps);
const proxy = {
host: this.validateEmptyString(proxyFromEnv.hostname),
port: Number(this.validateEmptyString(port)),
Expand Down

0 comments on commit dc8f7eb

Please sign in to comment.