Http: Add config value to turn it off, move all http settings into a category in the config

This commit is contained in:
Lion Kortlepel
2021-12-06 09:53:13 +01:00
parent bd41382233
commit 62cc1e9ce4
5 changed files with 46 additions and 41 deletions

View File

@@ -155,8 +155,10 @@ int BeamMPServerMain(MainArguments Arguments) {
Application::Console().InitializeLuaConsole(LuaEngine);
Application::CheckForUpdates();
Http::Server::SetupEnvironment();
Http::Server::THttpServerInstance HttpServerInstance {};
if (Application::Settings.HTTPServerEnabled) {
Http::Server::SetupEnvironment();
Http::Server::THttpServerInstance HttpServerInstance {};
}
beammp_debug("cert.pem is " + std::to_string(fs::file_size("cert.pem")) + " bytes");
beammp_debug("key.pem is " + std::to_string(fs::file_size("key.pem")) + " bytes");