update submodules, remove ssl crap

This commit is contained in:
Lion Kortlepel
2022-05-26 11:59:36 +02:00
parent 4f69ca1ad0
commit a0876ed58c
10 changed files with 9 additions and 17 deletions

View File

@@ -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/fmt vendored

Submodule deps/fmt updated: 17dda58391...ce246aaf74

2
deps/json vendored

Submodule deps/json updated: eb21824147...31e25839b6

2
deps/sol2 vendored

Submodule deps/sol2 updated: c068aefbed...d0eba0a754

2
deps/toml11 vendored

View File

@@ -29,8 +29,6 @@ namespace Server {
class THttpServerInstance {
public:
THttpServerInstance();
static fs::path KeyFilePath;
static fs::path CertFilePath;
protected:
void operator()();

View File

@@ -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>();
}
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");

View File

@@ -17,7 +17,7 @@
#include <iostream>
#include <thread>
#define CPPHTTPLIB_OPENSSL_SUPPORT 1
static const std::string sCommandlineArguments = R"(
USAGE:
BeamMP-Server [arguments]