#include "dnsdist-web.hh"
#include "dolog.hh"
#include "gettime.hh"
-#include "htmlfiles.h"
#include "threadname.hh"
#include "sodcrypto.hh"
#include "sstuff.hh"
s_webHandlers.clear();
}
+#ifndef DISABLE_BUILTIN_HTML
+#include "htmlfiles.h"
+
static void redirectToIndex(const YaHTTP::Request& req, YaHTTP::Response& resp)
{
const string charset = "; charset=utf-8";
resp.status = 200;
}
+#endif /* DISABLE_BUILTIN_HTML */
void registerBuiltInWebHandlers()
{
registerWebHandler("/api/v1/servers/localhost/statistics", handleStatsOnly);
registerWebHandler("/api/v1/servers/localhost/config", handleConfigDump);
registerWebHandler("/api/v1/servers/localhost/config/allow-from", handleAllowFrom);
+#ifndef DISABLE_BUILTIN_HTML
registerWebHandler("/", redirectToIndex);
for (const auto& path : s_urlmap) {
registerWebHandler("/" + path.first, handleBuiltInFiles);
}
+#endif /* DISABLE_BUILTIN_HTML */
}
static void connectionThread(WebClientConnection&& conn)