mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-06-17 14:12:25 +00:00
update submodules, remove ssl crap
This commit is contained in:
+1
-1
@@ -35,7 +35,7 @@ include_directories("${PROJECT_SOURCE_DIR}/deps/cpp-httplib")
|
|||||||
include_directories("${PROJECT_SOURCE_DIR}/deps/json/single_include")
|
include_directories("${PROJECT_SOURCE_DIR}/deps/json/single_include")
|
||||||
include_directories("${PROJECT_SOURCE_DIR}/deps")
|
include_directories("${PROJECT_SOURCE_DIR}/deps")
|
||||||
|
|
||||||
add_compile_definitions(CPPHTTPLIB_OPENSSL_SUPPORT)
|
add_compile_definitions(CPPHTTPLIB_OPENSSL_SUPPORT=1)
|
||||||
|
|
||||||
# ------------------------ APPLE ---------------------------------
|
# ------------------------ APPLE ---------------------------------
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
|||||||
Vendored
+1
-1
Submodule deps/cpp-httplib updated: b324921c1a...47044c05a8
Vendored
+1
-1
Submodule deps/fmt updated: 17dda58391...ce246aaf74
Vendored
+1
-1
Submodule deps/json updated: eb21824147...31e25839b6
Vendored
+1
-1
Submodule deps/sentry-native updated: 90966cc102...0a498e3e40
Vendored
+1
-1
Submodule deps/sol2 updated: c068aefbed...d0eba0a754
Vendored
+1
-1
Submodule deps/toml11 updated: fda0a2b9ab...e8f922a1b8
@@ -29,8 +29,6 @@ namespace Server {
|
|||||||
class THttpServerInstance {
|
class THttpServerInstance {
|
||||||
public:
|
public:
|
||||||
THttpServerInstance();
|
THttpServerInstance();
|
||||||
static fs::path KeyFilePath;
|
|
||||||
static fs::path CertFilePath;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void operator()();
|
void operator()();
|
||||||
|
|||||||
@@ -151,13 +151,7 @@ Http::Server::THttpServerInstance::THttpServerInstance() {
|
|||||||
void Http::Server::THttpServerInstance::operator()() try {
|
void Http::Server::THttpServerInstance::operator()() try {
|
||||||
beammp_info("HTTP(S) Server started on port " + std::to_string(Application::Settings.HTTPServerPort));
|
beammp_info("HTTP(S) Server started on port " + std::to_string(Application::Settings.HTTPServerPort));
|
||||||
std::unique_ptr<httplib::Server> HttpLibServerInstance;
|
std::unique_ptr<httplib::Server> HttpLibServerInstance;
|
||||||
if (Application::Settings.HTTPServerUseSSL) {
|
|
||||||
HttpLibServerInstance = std::make_unique<httplib::SSLServer>(
|
|
||||||
reinterpret_cast<const char*>(Http::Server::THttpServerInstance::CertFilePath.c_str()),
|
|
||||||
reinterpret_cast<const char*>(Http::Server::THttpServerInstance::KeyFilePath.c_str()));
|
|
||||||
} else {
|
|
||||||
HttpLibServerInstance = std::make_unique<httplib::Server>();
|
HttpLibServerInstance = std::make_unique<httplib::Server>();
|
||||||
}
|
|
||||||
// todo: make this IP agnostic so people can set their own IP
|
// todo: make this IP agnostic so people can set their own IP
|
||||||
HttpLibServerInstance->Get("/", [](const httplib::Request&, httplib::Response& res) {
|
HttpLibServerInstance->Get("/", [](const httplib::Request&, httplib::Response& res) {
|
||||||
res.set_content("<!DOCTYPE html><article><h1>Hello World!</h1><section><p>BeamMP Server can now serve HTTP requests!</p></section></article></html>", "text/html");
|
res.set_content("<!DOCTYPE html><article><h1>Hello World!</h1><section><p>BeamMP Server can now serve HTTP requests!</p></section></article></html>", "text/html");
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#define CPPHTTPLIB_OPENSSL_SUPPORT 1
|
|
||||||
static const std::string sCommandlineArguments = R"(
|
static const std::string sCommandlineArguments = R"(
|
||||||
USAGE:
|
USAGE:
|
||||||
BeamMP-Server [arguments]
|
BeamMP-Server [arguments]
|
||||||
|
|||||||
Reference in New Issue
Block a user