mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-02-16 02:30:54 +00:00
update submodules, remove ssl crap
This commit is contained in:
@@ -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")
|
||||
|
||||
add_compile_definitions(CPPHTTPLIB_OPENSSL_SUPPORT)
|
||||
add_compile_definitions(CPPHTTPLIB_OPENSSL_SUPPORT=1)
|
||||
|
||||
# ------------------------ APPLE ---------------------------------
|
||||
if(APPLE)
|
||||
|
||||
2
deps/cpp-httplib
vendored
2
deps/cpp-httplib
vendored
Submodule deps/cpp-httplib updated: b324921c1a...47044c05a8
2
deps/fmt
vendored
2
deps/fmt
vendored
Submodule deps/fmt updated: 17dda58391...ce246aaf74
2
deps/json
vendored
2
deps/json
vendored
Submodule deps/json updated: eb21824147...31e25839b6
2
deps/sentry-native
vendored
2
deps/sentry-native
vendored
Submodule deps/sentry-native updated: 90966cc102...0a498e3e40
2
deps/sol2
vendored
2
deps/sol2
vendored
Submodule deps/sol2 updated: c068aefbed...d0eba0a754
2
deps/toml11
vendored
2
deps/toml11
vendored
Submodule deps/toml11 updated: fda0a2b9ab...e8f922a1b8
@@ -29,8 +29,6 @@ namespace Server {
|
||||
class THttpServerInstance {
|
||||
public:
|
||||
THttpServerInstance();
|
||||
static fs::path KeyFilePath;
|
||||
static fs::path CertFilePath;
|
||||
|
||||
protected:
|
||||
void operator()();
|
||||
|
||||
@@ -151,13 +151,7 @@ Http::Server::THttpServerInstance::THttpServerInstance() {
|
||||
void Http::Server::THttpServerInstance::operator()() try {
|
||||
beammp_info("HTTP(S) Server started on port " + std::to_string(Application::Settings.HTTPServerPort));
|
||||
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>();
|
||||
}
|
||||
// todo: make this IP agnostic so people can set their own IP
|
||||
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");
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
#define CPPHTTPLIB_OPENSSL_SUPPORT 1
|
||||
|
||||
static const std::string sCommandlineArguments = R"(
|
||||
USAGE:
|
||||
BeamMP-Server [arguments]
|
||||
|
||||
Reference in New Issue
Block a user