srv.reset(
new httplib::SSLServer(params.ssl_file_cert.c_str(), params.ssl_file_key.c_str())
);
+ is_ssl = true;
} else {
SRV_INF("%s", "running without SSL\n");
srv.reset(new httplib::Server());
thread = std::thread([this]() { pimpl->srv->listen_after_bind(); });
srv->wait_until_ready();
- listening_address = is_sock ? string_format("unix://%s", hostname.c_str())
- : string_format("http://%s:%d", hostname.c_str(), port);
+ listening_address = is_sock ? string_format("unix://%s", hostname.c_str())
+ : string_format("%s://%s:%d", is_ssl ? "https" : "http", hostname.c_str(), port);
return true;
}