Merge d10d64864fe6aa9f75edf1cc7537188d72f0082c into dbebe359e495844f078430a9de2b64d21656c21a

This commit is contained in:
arika 2024-08-07 14:02:15 +02:00 committed by GitHub
commit 520200b7e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -416,6 +416,13 @@ function GetHTTPResponse([Uri] $Uri, [bool]$HeaderOnly, [bool]$DisableRedirect,
UseDefaultCredentials=$ProxyUseDefaultCredentials;
BypassList = $ProxyBypassList;
}
# If ProxyAddress is contained username and password, then set credentials
# e.g. http://(user):(pass)@...
if ($ProxyAddress -match '://(.*?):(.*?)@') {
$proxyUsername = $matches[1]
$proxyPassword = $matches[2]
$HttpClientHandler.Proxy.Credentials = New-Object System.Net.NetworkCredential($proxyUsername, $proxyPassword)
}
}
if ($DisableRedirect)
{