summaryrefslogtreecommitdiffstatshomepage
path: root/node_modules/@actions/http-client/lib/proxy.js
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-02-28 21:59:12 +0100
committerEgor Tensin <egor@tensin.name>2026-02-28 22:19:57 +0100
commit9611c248995ad3bacda1d0a93d0b5e1e6605d162 (patch)
treeeb3ae35b426e9d72e7cb34e8e9cc0453745a8e17 /node_modules/@actions/http-client/lib/proxy.js
parentDEVELOPMENT.md: expand on sources (diff)
downloadcleanup-path-9611c248995ad3bacda1d0a93d0b5e1e6605d162.tar.gz
cleanup-path-9611c248995ad3bacda1d0a93d0b5e1e6605d162.zip
upgrade actions/core to version 2
Diffstat (limited to 'node_modules/@actions/http-client/lib/proxy.js')
-rw-r--r--node_modules/@actions/http-client/lib/proxy.js22
1 files changed, 17 insertions, 5 deletions
diff --git a/node_modules/@actions/http-client/lib/proxy.js b/node_modules/@actions/http-client/lib/proxy.js
index d9c43ad..aef23f3 100644
--- a/node_modules/@actions/http-client/lib/proxy.js
+++ b/node_modules/@actions/http-client/lib/proxy.js
@@ -1,6 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.checkBypass = exports.getProxyUrl = void 0;
+exports.getProxyUrl = getProxyUrl;
+exports.checkBypass = checkBypass;
function getProxyUrl(reqUrl) {
const usingSsl = reqUrl.protocol === 'https:';
if (checkBypass(reqUrl)) {
@@ -16,18 +17,17 @@ function getProxyUrl(reqUrl) {
})();
if (proxyVar) {
try {
- return new URL(proxyVar);
+ return new DecodedURL(proxyVar);
}
catch (_a) {
if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))
- return new URL(`http://${proxyVar}`);
+ return new DecodedURL(`http://${proxyVar}`);
}
}
else {
return undefined;
}
}
-exports.getProxyUrl = getProxyUrl;
function checkBypass(reqUrl) {
if (!reqUrl.hostname) {
return false;
@@ -71,7 +71,6 @@ function checkBypass(reqUrl) {
}
return false;
}
-exports.checkBypass = checkBypass;
function isLoopbackAddress(host) {
const hostLower = host.toLowerCase();
return (hostLower === 'localhost' ||
@@ -79,4 +78,17 @@ function isLoopbackAddress(host) {
hostLower.startsWith('[::1]') ||
hostLower.startsWith('[0:0:0:0:0:0:0:1]'));
}
+class DecodedURL extends URL {
+ constructor(url, base) {
+ super(url, base);
+ this._decodedUsername = decodeURIComponent(super.username);
+ this._decodedPassword = decodeURIComponent(super.password);
+ }
+ get username() {
+ return this._decodedUsername;
+ }
+ get password() {
+ return this._decodedPassword;
+ }
+}
//# sourceMappingURL=proxy.js.map \ No newline at end of file