mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-06-17 14:12:25 +00:00
fully switch to new backend urls
This commit is contained in:
+1
-1
@@ -50,7 +50,7 @@ public:
|
|||||||
static inline TSettings Settings {};
|
static inline TSettings Settings {};
|
||||||
|
|
||||||
static std::string GetBackendUrlForAuth() { return "auth.beammp.com"; }
|
static std::string GetBackendUrlForAuth() { return "auth.beammp.com"; }
|
||||||
static std::string GetBackendHostname() { return "beammp.com"; }
|
static std::string GetBackendHostname() { return "backend.beammp.com"; }
|
||||||
static std::string GetBackendUrlForSocketIO() { return "https://backend.beammp.com"; }
|
static std::string GetBackendUrlForSocketIO() { return "https://backend.beammp.com"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -37,12 +37,12 @@ void THeartbeatThread::operator()() {
|
|||||||
|
|
||||||
Body += "&pps=" + Application::PPS();
|
Body += "&pps=" + Application::PPS();
|
||||||
|
|
||||||
T = Http::POST(Application::GetBackendHostname(), "/heartbeatv2", {}, Body, false);
|
T = Http::POST(Application::GetBackendHostname(), "/heartbeat", {}, Body, false);
|
||||||
|
|
||||||
if (T.substr(0, 2) != "20") {
|
if (T.substr(0, 2) != "20") {
|
||||||
//Backend system refused server startup!
|
//Backend system refused server startup!
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
||||||
T = Http::POST(Application::GetBackendHostname(), "/heartbeatv2", {}, Body, false);
|
T = Http::POST(Application::GetBackendHostname(), "/heartbeat", {}, Body, false);
|
||||||
// TODO backup2 + HTTP flag (no TSL)
|
// TODO backup2 + HTTP flag (no TSL)
|
||||||
if (T.substr(0, 2) != "20") {
|
if (T.substr(0, 2) != "20") {
|
||||||
warn("Backend system refused server! Server might not show in the public list");
|
warn("Backend system refused server! Server might not show in the public list");
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
|
#include "Http.h"
|
||||||
#include "TConfig.h"
|
#include "TConfig.h"
|
||||||
#include "THeartbeatThread.h"
|
#include "THeartbeatThread.h"
|
||||||
#include "TLuaEngine.h"
|
#include "TLuaEngine.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user