Skip to content

Commit

Permalink
Address #642
Browse files Browse the repository at this point in the history
Update standard user agent to Microsoft Edge on Windows, and Google Bot
  • Loading branch information
aaronparker committed Mar 20, 2024
1 parent 0174e37 commit c9dce8c
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 46 deletions.
87 changes: 47 additions & 40 deletions Evergreen/Evergreen.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,48 @@
{
"Preferences": {
"ErrorAction": "Stop"
},
"Filters": {
"WindowsInstallers": "\\.exe$|\\.msi$|\\.msp$|\\.zip$",
"Filename": "(([a-zA-Z0-9\\s_\\.\\-\\(\\):])+(.exe|.msi|.msp|.zip))"
},
"Properties": {
"SourceForge": [
"release",
"platform_releases"
],
"GitHub": [
"assets",
"assets_url",
"author",
"body",
"created_at",
"draft",
"html_url",
"id",
"name",
"node_id",
"prerelease",
"published_at",
"tag_name",
"tarball_url",
"target_commitish",
"upload_url",
"url",
"zipball_url"
]
},
"Uri": {
"Project": "https://github.com/aaronparker/evergreen/",
"Docs": "https://stealthpuppy.com/evergreen/",
"Issues": "https://stealthpuppy.com/evergreen/issues/",
"Info": "https://stealthpuppy.com/evergreen/troubleshoot/"
}
}
"Preferences": {
"ErrorAction": "Stop"
},
"UserAgent": {
"Base": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.",
"Download": [
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.",
"Googlebot/2.1 (+http://www.google.com/bot.html)"
]
},
"Filters": {
"WindowsInstallers": "\\.exe$|\\.msi$|\\.msp$|\\.zip$",
"Filename": "(([a-zA-Z0-9\\s_\\.\\-\\(\\):])+(.exe|.msi|.msp|.zip))"
},
"Properties": {
"SourceForge": [
"release",
"platform_releases"
],
"GitHub": [
"assets",
"assets_url",
"author",
"body",
"created_at",
"draft",
"html_url",
"id",
"name",
"node_id",
"prerelease",
"published_at",
"tag_name",
"tarball_url",
"target_commitish",
"upload_url",
"url",
"zipball_url"
]
},
"Uri": {
"Project": "https://github.com/aaronparker/evergreen/",
"Docs": "https://stealthpuppy.com/evergreen/",
"Issues": "https://stealthpuppy.com/evergreen/issues/",
"Info": "https://stealthpuppy.com/evergreen/troubleshoot/"
}
}
2 changes: 1 addition & 1 deletion Evergreen/Private/Invoke-EvergreenRestMethod.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function Invoke-EvergreenRestMethod {

[Parameter()]
[ValidateNotNullOrEmpty()]
[System.String] $UserAgent = [Microsoft.PowerShell.Commands.PSUserAgent]::Chrome,
[System.String] $UserAgent = $script:resourceStrings.UserAgent.Base,

[Parameter()]
[System.Management.Automation.SwitchParameter] $SkipCertificateCheck
Expand Down
2 changes: 1 addition & 1 deletion Evergreen/Private/Invoke-EvergreenWebRequest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function Invoke-EvergreenWebRequest {

[Parameter()]
[ValidateNotNullOrEmpty()]
[System.String] $UserAgent = [Microsoft.PowerShell.Commands.PSUserAgent]::Chrome,
[System.String] $UserAgent = $script:resourceStrings.UserAgent.Base,

[Parameter()]
[System.Management.Automation.SwitchParameter] $Raw,
Expand Down
2 changes: 1 addition & 1 deletion Evergreen/Private/Resolve-InvokeWebRequest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function Resolve-InvokeWebRequest {

[Parameter(Position = 1)]
[ValidateNotNullOrEmpty()]
[System.String] $UserAgent = [Microsoft.PowerShell.Commands.PSUserAgent]::Chrome,
[System.String] $UserAgent = $script:resourceStrings.UserAgent.Base,

[Parameter(Position = 2)]
[ValidateNotNullOrEmpty()]
Expand Down
2 changes: 1 addition & 1 deletion Evergreen/Private/Save-File.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
Uri = $Uri
OutFile = $OutFile
UseBasicParsing = $True
UserAgent = [Microsoft.PowerShell.Commands.PSUserAgent]::Chrome
UserAgent = $script:resourceStrings.UserAgent.Base
}
if (Test-PSCore) {
$params.SslProtocol = "Tls12"
Expand Down
2 changes: 1 addition & 1 deletion Evergreen/Public/Save-EvergreenApp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Function Save-EvergreenApp {

[Parameter()]
[ValidateNotNullOrEmpty()]
[System.String] $UserAgent = [Microsoft.PowerShell.Commands.PSUserAgent]::Chrome,
[System.String] $UserAgent = $script:resourceStrings.UserAgent.Base,

[Parameter(Mandatory = $false)]
[System.Management.Automation.SwitchParameter] $Force,
Expand Down
2 changes: 1 addition & 1 deletion Evergreen/Public/Test-EvergreenApp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-EvergreenApp {

[Parameter()]
[ValidateNotNullOrEmpty()]
[System.String] $UserAgent = [Microsoft.PowerShell.Commands.PSUserAgent]::Chrome,
[System.String] $UserAgent = $script:resourceStrings.UserAgent.Base,

[Parameter(Mandatory = $False)]
[System.Management.Automation.SwitchParameter] $Force,
Expand Down

0 comments on commit c9dce8c

Please sign in to comment.