HTTPServer: Add config value to specify listen IP

Change default IP to localhost,
Set default SSL to false due to this.
This commit is contained in:
Lion Kortlepel
2022-04-28 14:12:26 +02:00
parent 0979c8b1e4
commit 974dda9f8b
3 changed files with 9 additions and 3 deletions

View File

@@ -374,7 +374,7 @@ void Http::Server::THttpServerInstance::operator()() try {
beammp_debug("Http Server: " + Req.method + " " + Req.target + " -> " + std::to_string(Res.status));
});
Application::SetSubsystemStatus("HTTPServer", Application::Status::Good);
auto ret = HttpLibServerInstance->listen("0.0.0.0", Application::Settings.HTTPServerPort);
auto ret = HttpLibServerInstance->listen(Application::Settings.HTTPServerIP.c_str(), Application::Settings.HTTPServerPort);
if (!ret) {
beammp_error("Failed to start http server (failed to listen). Please ensure the http server is configured properly in the ServerConfig.toml, or turn it off if you don't need it.");
}