From a54d9aad196212935a4c945d6cb51656880ab859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Rom=C3=A1n?= Date: Thu, 15 Sep 2022 15:56:21 -0700 Subject: [PATCH 1/3] feat(checkurls): Allow checking URLs from private_hosts --- bin/checkurls.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/checkurls.ps1 b/bin/checkurls.ps1 index b624b07c01..f87e61449d 100644 --- a/bin/checkurls.ps1 +++ b/bin/checkurls.ps1 @@ -62,6 +62,13 @@ function test_dl([String] $url, $cookies) { $wreq.Headers.Add('Cookie', (cookie_header $cookies)) } } + + get_config 'private_hosts' | Where-Object { $_ -ne $null -and $url -match $_.match } | ForEach-Object { + (ConvertFrom-StringData -StringData $_.Headers).GetEnumerator() | ForEach-Object { + $wreq.Headers[$_.Key] = $_.Value + } + } + $wres = $null try { $wres = $wreq.GetResponse() From 4977e99422ebfe04ca9966a5ca90ab635c090c70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Rom=C3=A1n?= Date: Thu, 15 Sep 2022 16:02:05 -0700 Subject: [PATCH 2/3] docs: update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7db6749759..89fb003cf7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Features +- **checkurls**: Allow checking URLs from private_hosts ([#5152](https://github.com/ScoopInstaller/Scoop/pull/5152)) - **getopt:** Support option terminator (`--`) ([#5121](https://github.com/ScoopInstaller/Scoop/issues/5121)) - **scoop-(un)hold:** Support `scoop (un)hold scoop` ([#5089](https://github.com/ScoopInstaller/Scoop/issues/5089)) - **scoop-config:** Allow 'hold_update_until' be set manually ([#5100](https://github.com/ScoopInstaller/Scoop/issues/5100)) From 88af65c3b7c5b5e705084f05dc30b606cbcadfa7 Mon Sep 17 00:00:00 2001 From: Hsiao-nan Cheung Date: Fri, 16 Sep 2022 11:28:46 +0800 Subject: [PATCH 3/3] Some fixes --- CHANGELOG.md | 2 +- bin/checkurls.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89fb003cf7..cc5763a03e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,6 @@ ### Features -- **checkurls**: Allow checking URLs from private_hosts ([#5152](https://github.com/ScoopInstaller/Scoop/pull/5152)) - **getopt:** Support option terminator (`--`) ([#5121](https://github.com/ScoopInstaller/Scoop/issues/5121)) - **scoop-(un)hold:** Support `scoop (un)hold scoop` ([#5089](https://github.com/ScoopInstaller/Scoop/issues/5089)) - **scoop-config:** Allow 'hold_update_until' be set manually ([#5100](https://github.com/ScoopInstaller/Scoop/issues/5100)) @@ -23,6 +22,7 @@ ### Builds +- **checkurls**: Allow checking URLs from private_hosts ([#5152](https://github.com/ScoopInstaller/Scoop/issues/5152)) - **schema**: Set manifest schema to be stricter ([#5093](https://github.com/ScoopInstaller/Scoop/issues/5093)) ## [v0.2.4](https://github.com/ScoopInstaller/Scoop/compare/v0.2.3...v0.2.4) - 2022-08-08 diff --git a/bin/checkurls.ps1 b/bin/checkurls.ps1 index f87e61449d..e4ed666dec 100644 --- a/bin/checkurls.ps1 +++ b/bin/checkurls.ps1 @@ -63,7 +63,7 @@ function test_dl([String] $url, $cookies) { } } - get_config 'private_hosts' | Where-Object { $_ -ne $null -and $url -match $_.match } | ForEach-Object { + get_config PRIVATE_HOSTS | Where-Object { $_ -ne $null -and $url -match $_.match } | ForEach-Object { (ConvertFrom-StringData -StringData $_.Headers).GetEnumerator() | ForEach-Object { $wreq.Headers[$_.Key] = $_.Value }