From a972b0b2baeb1df814b898008308b5fde3d285af Mon Sep 17 00:00:00 2001 From: MartinNielsenDev Date: Wed, 14 Sep 2022 21:17:00 +0200 Subject: [PATCH] Changed api calls to HTTPS --- BetterOverwatch/Networking/Server.cs | 8 ++++---- BetterOverwatch/TrayMenu.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/BetterOverwatch/Networking/Server.cs b/BetterOverwatch/Networking/Server.cs index 7901a7f..1f79e98 100644 --- a/BetterOverwatch/Networking/Server.cs +++ b/BetterOverwatch/Networking/Server.cs @@ -33,7 +33,7 @@ internal static bool FetchNetworks() { using (WebClient client = new WebClient()) { - byte[] response = client.UploadValues($"http://api.{AppData.initalize.Host}/network/", new NameValueCollection + byte[] response = client.UploadValues($"https://api.{AppData.initalize.Host}/network/", new NameValueCollection { { "version", AppData.settings.networkVersion.ToString() } }); @@ -81,7 +81,7 @@ internal static void VerifyToken() { using (WebClient client = new WebClient()) { - byte[] response = client.UploadValues($"http://api.{AppData.initalize.Host}/verify-account/", new NameValueCollection + byte[] response = client.UploadValues($"https://api.{AppData.initalize.Host}/verify-account/", new NameValueCollection { { "privateToken", AppData.settings.privateToken } }); @@ -117,7 +117,7 @@ internal static bool FetchBlizzardAppOffset(string version) { using (WebClient client = new WebClient()) { - byte[] response = client.UploadValues($"http://api.{AppData.initalize.Host}/fetch-offset/", new NameValueCollection + byte[] response = client.UploadValues($"https://api.{AppData.initalize.Host}/fetch-offset/", new NameValueCollection { { "version", version } }); @@ -230,7 +230,7 @@ internal static void UploadGame(string gameData) { using (WebClient client = new WebClient()) { - byte[] response = client.UploadValues($"http://api.{AppData.initalize.Host}/game/upload/", new NameValueCollection { + byte[] response = client.UploadValues($"https://api.{AppData.initalize.Host}/game/upload/", new NameValueCollection { { "gameData", gameData } }); ServerOutput.TokensOutput result = JsonConvert.DeserializeObject(Encoding.UTF8.GetString(response)); diff --git a/BetterOverwatch/TrayMenu.cs b/BetterOverwatch/TrayMenu.cs index 0ec1093..e97d31c 100644 --- a/BetterOverwatch/TrayMenu.cs +++ b/BetterOverwatch/TrayMenu.cs @@ -153,7 +153,7 @@ private void OpenMatchHistory(object sender, EventArgs e) { if (!AppData.settings.publicToken.Equals(string.Empty)) { - Process.Start($"http://{AppData.initalize.Host}/user/{AppData.settings.publicToken}"); + Process.Start($"https://{AppData.initalize.Host}/user/{AppData.settings.publicToken}"); } } private async void LoginLogout(object sender, EventArgs e)