Add region tld

This commit is contained in:
SaltySnail
2026-06-23 02:38:02 +02:00
parent 92381aa048
commit 55efae0658
8 changed files with 43 additions and 14 deletions
+3 -2
View File
@@ -6,6 +6,7 @@
#include "Http.h"
#include "Options.h"
#include "Logger.h"
#include <filesystem>
#include <fstream>
@@ -55,7 +56,7 @@ std::string Login(const std::string& fields) {
}
info("Attempting to authenticate...");
try {
std::string Buffer = HTTP::Post("https://auth.beammp.com/userlogin", fields);
std::string Buffer = HTTP::Post("https://auth." + Utils::RegionToTopLevelDomain(options.region) + "/userlogin", fields);
if (Buffer.empty()) {
return GetFail("Failed to communicate with the auth system!");
@@ -115,7 +116,7 @@ void CheckLocalKey() {
}
}
Buffer = HTTP::Post("https://auth.beammp.com/userlogin", R"({"pk":")" + Buffer + "\"}");
Buffer = HTTP::Post("https://auth." + Utils::RegionToTopLevelDomain(options.region) + "/userlogin", R"({"pk":")" + Buffer + "\"}");
nlohmann::json d = nlohmann::json::parse(Buffer, nullptr, false);