diff --git a/CHANGELOG.md b/CHANGELOG.md index a26150e727..73ad1d56b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ - **git:** Use Invoke-Git() with direct path to git.exe to prevent spawning shim subprocesses ([#5122](/~https://github.com/ScoopInstaller/Scoop/issues/5122), [#5375](/~https://github.com/ScoopInstaller/Scoop/issues/5375)) - **scoop-download:** Output more detailed manifest information ([#5277](/~https://github.com/ScoopInstaller/Scoop/issues/5277)) +### Builds + +- **checkver:** Read the private_host config variable ([#5381](/~https://github.com/ScoopInstaller/Scoop/issues/5381)) + ### Continuous Integration - **dependabot:** Add dependabot.yml for GitHub Actions ([#5377](/~https://github.com/ScoopInstaller/Scoop/pull/5377)) diff --git a/bin/checkver.ps1 b/bin/checkver.ps1 index 56b8c8c987..e740208d99 100644 --- a/bin/checkver.ps1 +++ b/bin/checkver.ps1 @@ -226,15 +226,21 @@ $Queue | ForEach-Object { $url = substitute $url $substitutions $state = New-Object psobject @{ - app = $name; - file = $file; - url = $url; - regex = $regex; - json = $json; - jsonpath = $jsonpath; - xpath = $xpath; - reverse = $reverse; - replace = $replace; + app = $name + file = $file + url = $url + regex = $regex + json = $json + jsonpath = $jsonpath + xpath = $xpath + reverse = $reverse + replace = $replace + } + + get_config PRIVATE_HOSTS | Where-Object { $_ -ne $null -and $url -match $_.match } | ForEach-Object { + (ConvertFrom-StringData -StringData $_.Headers).GetEnumerator() | ForEach-Object { + $wc.Headers[$_.Key] = $_.Value + } } $wc.Headers.Add('Referer', (strip_filename $url))