luaCtx.writeFunction("showWebserverConfig", []() {
setLuaNoSideEffect();
- return getWebServerConfig();
+ return getWebserverConfig();
});
luaCtx.writeFunction("hashPassword", [](const std::string& password, boost::optional<uint64_t> workFactor) {
static ConcurrentConnectionManager s_connManager(100);
-std::string getWebServerConfig()
+std::string getWebserverConfig()
{
ostringstream out;
out << "ACL: " << config->acl.toString() << endl;
out << "Custom headers: ";
if (config->customHeaders) {
+ out << endl;
for (const auto& header : *config->customHeaders) {
out << " - " << header.first << ": " << header.second << endl;
}
}
else {
- out << "None";
+ out << "None" << endl;
}
- out << endl;
out << "Statistics require authentication: " << (config->statsRequireAuthentication ? "yes" : "no") << endl;
out << "Password: " << (config->password ? "set" : "unset") << endl;
out << "API key: " << (config->apiKey ? "set" : "unset") << endl;