Merge pull request #6 from AndrewDemski-ad-gmail-com/AndrewDemski-ad-gmail-com-patch-2

Update Test-ModsPath.ps1
pull/675/head
Andrzej Demski 2024-09-01 11:34:51 +02:00 committed by GitHub
commit 066397fea6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -12,8 +12,9 @@ function Test-ModsPath ($ModsPath, $WingetUpdatePath, $AzureBlobSASURL) {
# If path is URL
if ($ExternalMods -like "http*") {
# enable TLS 1.2 and TLS 1.1 protocols
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12, [Net.SecurityProtocolType]::Tls11
# ADD TLS 1.2 and TLS 1.1 to list of currently used protocols
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls11
#Get Index of $ExternalMods (or index page with href listing of all the Mods)
try {
$WebResponse = Invoke-WebRequest -Uri $ExternalMods -UseBasicParsing