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 path is URL
if ($ExternalMods -like "http*") { if ($ExternalMods -like "http*") {
# enable TLS 1.2 and TLS 1.1 protocols # ADD TLS 1.2 and TLS 1.1 to list of currently used protocols
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12, [Net.SecurityProtocolType]::Tls11 [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) #Get Index of $ExternalMods (or index page with href listing of all the Mods)
try { try {
$WebResponse = Invoke-WebRequest -Uri $ExternalMods -UseBasicParsing $WebResponse = Invoke-WebRequest -Uri $ExternalMods -UseBasicParsing