mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-06-23 13:02:25 +00:00
Add region tld
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user