Add setting for default user agent

This commit is contained in:
2017-08-15 16:57:24 -04:00
parent 80cd26b8c3
commit 952b65b387
12 changed files with 192 additions and 123 deletions

View File

@@ -142,7 +142,10 @@ namespace FeedCenter
webRequest.Credentials = new NetworkCredential(Username, Password, Domain);
// Set a user agent string
webRequest.UserAgent = "FeedCenter " + UpdateCheck.LocalVersion;
if (string.IsNullOrWhiteSpace(Properties.Settings.Default.DefaultUserAgent))
webRequest.UserAgent = "FeedCenter/" + UpdateCheck.LocalVersion;
else
webRequest.UserAgent = Properties.Settings.Default.DefaultUserAgent;
}
// Set the default encoding