add HTTP server
This commit is contained in:
@@ -615,6 +615,16 @@ void ServerState::load_config() {
|
||||
}
|
||||
} catch (const out_of_range&) {
|
||||
}
|
||||
try {
|
||||
for (const auto& item : json.at("HTTPListen").as_list()) {
|
||||
if (item->is_int()) {
|
||||
this->http_addresses.emplace_back(string_printf("0.0.0.0:%" PRId64, item->as_int()));
|
||||
} else {
|
||||
this->http_addresses.emplace_back(item->as_string());
|
||||
}
|
||||
}
|
||||
} catch (const out_of_range&) {
|
||||
}
|
||||
}
|
||||
|
||||
auto local_address_str = json.at("LocalAddress").as_string();
|
||||
|
||||
Reference in New Issue
Block a user