]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: More options to disable features, fix compilation on OpenWRT
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 12 Nov 2021 17:04:44 +0000 (18:04 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 22 Dec 2021 08:30:44 +0000 (09:30 +0100)
pdns/dnsdist-lua-bindings-dnsquestion.cc
pdns/dnsdist-lua-bindings.cc
pdns/dnsdist-lua-inspection.cc
pdns/dnsdist-lua.cc
pdns/dnsdist.cc
pdns/dnsdistdist/dnsdist-lua-bindings-packetcache.cc
pdns/dnsdistdist/dnsdist-lua-web.cc

index 2baa1c9bdcd02a18ca64e6b3d476f63d41245fa9..40919afdacd7073655ddf965ba86d73ef0950b8a 100644 (file)
@@ -26,6 +26,7 @@
 
 void setupLuaBindingsDNSQuestion(LuaContext& luaCtx)
 {
+#ifndef DISABLE_NON_FFI_DQ_BINDINGS
   /* DNSQuestion */
   /* PowerDNS DNSQuestion compat */
   luaCtx.registerMember<const ComboAddress (DNSQuestion::*)>("localaddr", [](const DNSQuestion& dq) -> const ComboAddress { return *dq.local; }, [](DNSQuestion& dq, const ComboAddress newLocal) { (void) newLocal; });
@@ -306,4 +307,5 @@ void setupLuaBindingsDNSQuestion(LuaContext& luaCtx)
       checkParameterBound("setNegativeAndAdditionalSOA", minimum, std::numeric_limits<uint32_t>::max());
       return setNegativeAndAdditionalSOA(dq, nxd, DNSName(zone), ttl, DNSName(mname), DNSName(rname), serial, refresh, retry, expire, minimum);
     });
+#endif /* DISABLE_NON_FFI_DQ_BINDINGS */
 }
index 265f712aad4989c65d70b66a806530a02308b68a..bc264ab67ea09e7d7bf5b66c68f9c456058579bb 100644 (file)
@@ -57,6 +57,7 @@ void setupLuaBindings(LuaContext& luaCtx, bool client)
       }
       return string("No exception");
     });
+#ifndef DISABLE_POLICIES_BINDINGS
   /* ServerPolicy */
   luaCtx.writeFunction("newServerPolicy", [](string name, ServerPolicy::policyfunc_t policy) { return std::make_shared<ServerPolicy>(name, policy, true);});
   luaCtx.registerMember("name", &ServerPolicy::d_name);
@@ -74,6 +75,7 @@ void setupLuaBindings(LuaContext& luaCtx, bool client)
   luaCtx.writeVariable("whashed", ServerPolicy{"whashed", whashed, false});
   luaCtx.writeVariable("chashed", ServerPolicy{"chashed", chashed, false});
   luaCtx.writeVariable("leastOutstanding", ServerPolicy{"leastOutstanding", leastOutstanding, false});
+#endif /* DISABLE_POLICIES_BINDINGS */
 
   /* ServerPool */
   luaCtx.registerFunction<void(std::shared_ptr<ServerPool>::*)(std::shared_ptr<DNSDistPacketCache>)>("setCache", [](std::shared_ptr<ServerPool> pool, std::shared_ptr<DNSDistPacketCache> cache) {
@@ -90,6 +92,7 @@ void setupLuaBindings(LuaContext& luaCtx, bool client)
   luaCtx.registerFunction("getECS", &ServerPool::getECS);
   luaCtx.registerFunction("setECS", &ServerPool::setECS);
 
+#ifndef DISABLE_DOWNSTREAM_BINDINGS
   /* DownstreamState */
   luaCtx.registerFunction<void(DownstreamState::*)(int)>("setQPS", [](DownstreamState& s, int lim) { s.qps = lim ? QPSLimiter(lim, lim) : QPSLimiter(); });
   luaCtx.registerFunction<void(std::shared_ptr<DownstreamState>::*)(string)>("addPool", [](std::shared_ptr<DownstreamState> s, string pool) {
@@ -126,7 +129,9 @@ void setupLuaBindings(LuaContext& luaCtx, bool client)
   luaCtx.registerMember("order", &DownstreamState::order);
   luaCtx.registerMember<const std::string(DownstreamState::*)>("name", [](const DownstreamState& backend) -> const std::string { return backend.getName(); }, [](DownstreamState& backend, const std::string& newName) { backend.setName(newName); });
   luaCtx.registerFunction<std::string(DownstreamState::*)()const>("getID", [](const DownstreamState& s) { return boost::uuids::to_string(s.id); });
+#endif /* DISABLE_DOWNSTREAM_BINDINGS */
 
+#ifndef DISABLE_DNSHEADER_BINDINGS
   /* dnsheader */
   luaCtx.registerFunction<void(dnsheader::*)(bool)>("setRD", [](dnsheader& dh, bool v) {
       dh.rd=v;
@@ -176,7 +181,9 @@ void setupLuaBindings(LuaContext& luaCtx, bool client)
   luaCtx.registerFunction<void(dnsheader::*)(bool)>("setQR", [](dnsheader& dh, bool v) {
       dh.qr=v;
     });
+#endif /* DISABLE_DNSHEADER_BINDINGS */
 
+#ifndef DISABLE_COMBO_ADDR_BINDINGS
   /* ComboAddress */
   luaCtx.writeFunction("newCA", [](const std::string& name) { return ComboAddress(name); });
   luaCtx.writeFunction("newCAFromRaw", [](const std::string& raw, boost::optional<uint16_t> port) {
@@ -214,7 +221,9 @@ void setupLuaBindings(LuaContext& luaCtx, bool client)
   luaCtx.registerFunction<bool(ComboAddress::*)()const>("isMappedIPv4", [](const ComboAddress& ca) { return ca.isMappedIPv4(); });
   luaCtx.registerFunction<ComboAddress(ComboAddress::*)()const>("mapToIPv4", [](const ComboAddress& ca) { return ca.mapToIPv4(); });
   luaCtx.registerFunction<bool(nmts_t::*)(const ComboAddress&)>("match", [](nmts_t& s, const ComboAddress& ca) { return s.match(ca); });
+#endif /* DISABLE_COMBO_ADDR_BINDINGS */
 
+#ifndef DISABLE_DNSNAME_BINDINGS
   /* DNSName */
   luaCtx.registerFunction("isPartOf", &DNSName::isPartOf);
   luaCtx.registerFunction<bool(DNSName::*)()>("chopOff", [](DNSName&dn ) { return dn.chopOff(); });
@@ -239,7 +248,9 @@ void setupLuaBindings(LuaContext& luaCtx, bool client)
   luaCtx.registerFunction("size",(size_t (DNSNameSet::*)() const) &DNSNameSet::size);
   luaCtx.registerFunction("clear",(void (DNSNameSet::*)()) &DNSNameSet::clear);
   luaCtx.registerFunction("empty",(bool (DNSNameSet::*)() const) &DNSNameSet::empty);
+#endif /* DISABLE_DNSNAME_BINDINGS */
 
+#ifndef DISABLE_SUFFIX_MATCH_BINDINGS
   /* SuffixMatchNode */
   luaCtx.registerFunction<void (SuffixMatchNode::*)(const boost::variant<DNSName, string, vector<pair<int, DNSName>>, vector<pair<int, string>>> &name)>("add", [](SuffixMatchNode &smn, const boost::variant<DNSName, string, vector<pair<int, DNSName>>, vector<pair<int, string>>> &name) {
       if (name.type() == typeid(DNSName)) {
@@ -297,7 +308,9 @@ void setupLuaBindings(LuaContext& luaCtx, bool client)
   });
 
   luaCtx.registerFunction("check",(bool (SuffixMatchNode::*)(const DNSName&) const) &SuffixMatchNode::check);
+#endif /* DISABLE_SUFFIX_MATCH_BINDINGS */
 
+#ifndef DISABLE_NETMASK_BINDINGS
   /* Netmask */
   luaCtx.writeFunction("newNetmask", [](boost::variant<std::string,ComboAddress> s, boost::optional<uint8_t> bits) {
     if (s.type() == typeid(ComboAddress)) {
@@ -345,11 +358,15 @@ void setupLuaBindings(LuaContext& luaCtx, bool client)
   luaCtx.registerFunction("clear", &NetmaskGroup::clear);
   luaCtx.registerFunction<string(NetmaskGroup::*)()const>("toString", [](const NetmaskGroup& nmg ) { return "NetmaskGroup " + nmg.toString(); });
   luaCtx.registerFunction<string(NetmaskGroup::*)()const>("__tostring", [](const NetmaskGroup& nmg ) { return "NetmaskGroup " + nmg.toString(); });
+#endif /* DISABLE_NETMASK_BINDINGS */
 
+#ifndef DISABLE_QPS_LIMITER_BINDINGS
   /* QPSLimiter */
   luaCtx.writeFunction("newQPSLimiter", [](int rate, int burst) { return QPSLimiter(rate, burst); });
   luaCtx.registerFunction("check", &QPSLimiter::check);
+#endif /* DISABLE_QPS_LIMITER_BINDINGS */
 
+#ifndef DISABLE_CLIENT_STATE_BINDINGS
   /* ClientState */
   luaCtx.registerFunction<std::string(ClientState::*)()const>("toString", [](const ClientState& fe) {
       setLuaNoSideEffect();
@@ -394,6 +411,7 @@ void setupLuaBindings(LuaContext& luaCtx, bool client)
       frontend.detachFilter();
     });
 #endif /* HAVE_EBPF */
+#endif /* DISABLE_CLIENT_STATE_BINDINGS */
 
   /* BPF Filter */
 #ifdef HAVE_EBPF
index a365698c5acd0a07e1125c9d72e842e134cb5f5e..5645cc83ed64408f7d3a56e9d583ae2d75aa356e 100644 (file)
@@ -70,7 +70,7 @@ static std::vector<std::pair<int, vector<boost::variant<string,double>>>> getGen
        });
 
   std::vector<std::pair<int, vector<boost::variant<string,double>>>> ret;
-  ret.reserve(std::min(rcounts.size(), top + 1U));
+  ret.reserve(std::min(rcounts.size(), static_cast<size_t>(top + 1U)));
   uint64_t count = 1;
   unsigned int rest = 0;
   for(const auto& rc : rcounts) {
index 1e7bf17dc20cdaf18e88f5334046e6cdff2fc253..b822ba2893bbccd4029c8e039e4dfb47379e5a1c 100644 (file)
@@ -698,8 +698,8 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
     bool reusePort = false;
     int tcpFastOpenQueueSize = 0;
     int tcpListenQueueSize = 0;
-    size_t maxInFlightQueriesPerConn = 0;
-    size_t tcpMaxConcurrentConnections = 0;
+    uint64_t maxInFlightQueriesPerConn = 0;
+    uint64_t tcpMaxConcurrentConnections = 0;
     std::string interface;
     std::set<int> cpus;
 
@@ -748,8 +748,8 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
     bool reusePort = false;
     int tcpFastOpenQueueSize = 0;
     int tcpListenQueueSize = 0;
-    size_t maxInFlightQueriesPerConn = 0;
-    size_t tcpMaxConcurrentConnections = 0;
+    uint64_t maxInFlightQueriesPerConn = 0;
+    uint64_t tcpMaxConcurrentConnections = 0;
     std::string interface;
     std::set<int> cpus;
 
@@ -1501,17 +1501,17 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
     DynBlockMaintenance::s_expiredDynBlocksPurgeInterval = interval;
   });
 
+#ifdef HAVE_DNSCRYPT
   luaCtx.writeFunction("addDNSCryptBind", [](const std::string& addr, const std::string& providerName, boost::variant<std::string, std::vector<std::pair<int, std::string>>> certFiles, boost::variant<std::string, std::vector<std::pair<int, std::string>>> keyFiles, boost::optional<localbind_t> vars) {
     if (g_configurationDone) {
       g_outputBuffer = "addDNSCryptBind cannot be used at runtime!\n";
       return;
     }
-#ifdef HAVE_DNSCRYPT
     bool reusePort = false;
     int tcpFastOpenQueueSize = 0;
     int tcpListenQueueSize = 0;
-    size_t maxInFlightQueriesPerConn = 0;
-    size_t tcpMaxConcurrentConnections = 0;
+    uint64_t maxInFlightQueriesPerConn = 0;
+    uint64_t tcpMaxConcurrentConnections = 0;
     std::string interface;
     std::set<int> cpus;
     std::vector<DNSCryptContext::CertKeyPaths> certKeys;
@@ -1571,14 +1571,10 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
       errlog(e.what());
       g_outputBuffer = "Error: " + string(e.what()) + "\n";
     }
-#else
-      g_outputBuffer = "Error: DNSCrypt support is not enabled.\n";
-#endif
   });
 
   luaCtx.writeFunction("showDNSCryptBinds", []() {
     setLuaNoSideEffect();
-#ifdef HAVE_DNSCRYPT
     ostringstream ret;
     boost::format fmt("%1$-3d %2% %|25t|%3$-20.20s");
     ret << (fmt % "#" % "Address" % "Provider Name") << endl;
@@ -1596,28 +1592,22 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
     }
 
     g_outputBuffer = ret.str();
-#else
-      g_outputBuffer = "Error: DNSCrypt support is not enabled.\n";
-#endif
   });
 
   luaCtx.writeFunction("getDNSCryptBind", [](uint64_t idx) {
     setLuaNoSideEffect();
-#ifdef HAVE_DNSCRYPT
     std::shared_ptr<DNSCryptContext> ret = nullptr;
     if (idx < g_dnsCryptLocals.size()) {
       ret = g_dnsCryptLocals.at(idx);
     }
     return ret;
-#else
-      g_outputBuffer = "Error: DNSCrypt support is not enabled.\n";
-#endif
   });
 
   luaCtx.writeFunction("getDNSCryptBindCount", []() {
     setLuaNoSideEffect();
     return g_dnsCryptLocals.size();
   });
+#endif /* HAVE_DNSCRYPT */
 
   luaCtx.writeFunction("showPools", []() {
     setLuaNoSideEffect();
@@ -1735,11 +1725,6 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
     g_outputBuffer = "dnsdist " + std::string(VERSION) + "\n";
   });
 
-  luaCtx.writeFunction("showSecurityStatus", []() {
-    setLuaNoSideEffect();
-    g_outputBuffer = std::to_string(g_stats.securityStatus) + "\n";
-  });
-
 #ifdef HAVE_EBPF
   luaCtx.writeFunction("setDefaultBPFFilter", [](std::shared_ptr<BPFFilter> bpf) {
     if (g_configurationDone) {
@@ -1979,6 +1964,7 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
   });
 #endif /* HAVE_NET_SNMP */
 
+#ifndef DISABLE_POLICIES_BINDINGS
   luaCtx.writeFunction("setServerPolicy", [](const ServerPolicy& policy) {
     setLuaSideEffect();
     g_policy.setState(policy);
@@ -2045,6 +2031,7 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
       g_outputBuffer = poolObj->policy->getName() + "\n";
     }
   });
+#endif /* DISABLE_POLICIES_BINDINGS */
 
   luaCtx.writeFunction("setTCPDownstreamCleanupInterval", [](uint64_t interval) {
     setLuaSideEffect();
@@ -2115,9 +2102,10 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
       return;
     }
     setLuaSideEffect();
-    g_proxyProtocolMaximumSize = std::max(static_cast<size_t>(16), size);
+    g_proxyProtocolMaximumSize = std::max(static_cast<uint64_t>(16), size);
   });
 
+#ifndef DISABLE_RECVMMSG
   luaCtx.writeFunction("setUDPMultipleMessagesVectorSize", [](uint64_t vSize) {
     if (g_configurationDone) {
       errlog("setUDPMultipleMessagesVectorSize() cannot be used at runtime!");
@@ -2132,6 +2120,7 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
       g_outputBuffer = "recvmmsg support is not available!\n";
 #endif
   });
+#endif /* DISABLE_RECVMMSG */
 
   luaCtx.writeFunction("setAddEDNSToSelfGeneratedResponses", [](bool add) {
     g_addEDNSToSelfGeneratedResponses = add;
@@ -2152,6 +2141,11 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
   });
 
 #ifndef DISABLE_SECPOLL
+  luaCtx.writeFunction("showSecurityStatus", []() {
+    setLuaNoSideEffect();
+    g_outputBuffer = std::to_string(g_stats.securityStatus) + "\n";
+  });
+
   luaCtx.writeFunction("setSecurityPollSuffix", [](const std::string& suffix) {
     if (g_configurationDone) {
       g_outputBuffer = "setSecurityPollSuffix() cannot be used at runtime!\n";
@@ -2297,8 +2291,8 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
     bool reusePort = false;
     int tcpFastOpenQueueSize = 0;
     int tcpListenQueueSize = 0;
-    size_t maxInFlightQueriesPerConn = 0;
-    size_t tcpMaxConcurrentConnections = 0;
+    uint64_t maxInFlightQueriesPerConn = 0;
+    uint64_t tcpMaxConcurrentConnections = 0;
     std::string interface;
     std::set<int> cpus;
 
@@ -2500,8 +2494,8 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
     bool reusePort = false;
     int tcpFastOpenQueueSize = 0;
     int tcpListenQueueSize = 0;
-    size_t maxInFlightQueriesPerConn = 0;
-    size_t tcpMaxConcurrentConns = 0;
+    uint64_t maxInFlightQueriesPerConn = 0;
+    uint64_t tcpMaxConcurrentConns = 0;
     std::string interface;
     std::set<int> cpus;
 
index b3f61390fadb218cbdbc0de1f5005737b47cbb2d..31fc9ad247fee999b5d41ab3bf83472750262bfa 100644 (file)
@@ -1121,6 +1121,7 @@ bool checkQueryHeaders(const struct dnsheader* dh)
   return true;
 }
 
+#ifndef DISABLE_RECVMMSG
 #if defined(HAVE_RECVMMSG) && defined(HAVE_SENDMMSG) && defined(MSG_WAITFORONE)
 static void queueResponse(const ClientState& cs, const PacketBuffer& response, const ComboAddress& dest, const ComboAddress& remote, struct mmsghdr& outMsg, struct iovec* iov, cmsgbuf_aligned* cbuf)
 {
@@ -1135,6 +1136,7 @@ static void queueResponse(const ClientState& cs, const PacketBuffer& response, c
   }
 }
 #endif /* defined(HAVE_RECVMMSG) && defined(HAVE_SENDMMSG) && defined(MSG_WAITFORONE) */
+#endif /* DISABLE_RECVMMSG */
 
 /* self-generated responses or cache hits */
 static bool prepareOutgoingResponse(LocalHolders& holders, ClientState& cs, DNSQuestion& dq, bool cacheHit)
@@ -1492,6 +1494,7 @@ static void processUDPQuery(ClientState& cs, LocalHolders& holders, const struct
     // the buffer might have been invalidated by now (resized)
     struct dnsheader* dh = dq.getHeader();
     if (result == ProcessQueryResult::SendAnswer) {
+#ifndef DISABLE_RECVMMSG
 #if defined(HAVE_RECVMMSG) && defined(HAVE_SENDMMSG) && defined(MSG_WAITFORONE)
       if (dq.delayMsec == 0 && responsesVect != nullptr) {
         queueResponse(cs, query, dest, remote, responsesVect[*queuedResponses], respIOV, respCBuf);
@@ -1499,6 +1502,7 @@ static void processUDPQuery(ClientState& cs, LocalHolders& holders, const struct
         return;
       }
 #endif /* defined(HAVE_RECVMMSG) && defined(HAVE_SENDMMSG) && defined(MSG_WAITFORONE) */
+#endif /* DISABLE_RECVMMSG */
       /* we use dest, always, because we don't want to use the listening address to send a response since it could be 0.0.0.0 */
       sendUDPResponse(cs.udpFD, query, dq.delayMsec, dest, remote);
       return;
@@ -1596,6 +1600,7 @@ static void processUDPQuery(ClientState& cs, LocalHolders& holders, const struct
   }
 }
 
+#ifndef DISABLE_RECVMMSG
 #if defined(HAVE_RECVMMSG) && defined(HAVE_SENDMMSG) && defined(MSG_WAITFORONE)
 static void MultipleMessagesUDPClientThread(ClientState* cs, LocalHolders& holders)
 {
@@ -1680,6 +1685,7 @@ static void MultipleMessagesUDPClientThread(ClientState* cs, LocalHolders& holde
   }
 }
 #endif /* defined(HAVE_RECVMMSG) && defined(HAVE_SENDMMSG) && defined(MSG_WAITFORONE) */
+#endif /* DISABLE_RECVMMSG */
 
 // listens to incoming queries, sends out to downstream servers, noting the intended return path
 static void udpClientThread(ClientState* cs)
@@ -1687,13 +1693,14 @@ static void udpClientThread(ClientState* cs)
   try {
     setThreadName("dnsdist/udpClie");
     LocalHolders holders;
-
+#ifndef DISABLE_RECVMMSG
 #if defined(HAVE_RECVMMSG) && defined(HAVE_SENDMMSG) && defined(MSG_WAITFORONE)
     if (g_udpVectorSize > 1) {
       MultipleMessagesUDPClientThread(cs, holders);
     }
     else
 #endif /* defined(HAVE_RECVMMSG) && defined(HAVE_SENDMMSG) && defined(MSG_WAITFORONE) */
+#endif /* DISABLE_RECVMMSG */
     {
       /* the actual buffer is larger because:
          - we may have to add EDNS and/or ECS
@@ -2404,9 +2411,11 @@ int main(int argc, char** argv)
 #ifdef HAVE_RE2
         cout<<"re2 ";
 #endif
+#ifndef DISABLE_RECVMMSG
 #if defined(HAVE_RECVMMSG) && defined(HAVE_SENDMMSG) && defined(MSG_WAITFORONE)
         cout<<"recvmmsg/sendmmsg ";
 #endif
+#endif /* DISABLE_RECVMMSG */
 #ifdef HAVE_NET_SNMP
         cout<<"snmp ";
 #endif
index f77051e41759b16bf5a79ddd205187ce99bec6bf..a5a37924e49ecd4abe64936c1c43e730aee4f324 100644 (file)
@@ -119,6 +119,8 @@ void setupLuaBindingsPacketCache(LuaContext& luaCtx, bool client)
 
       return res;
     });
+
+#ifndef DISABLE_PACKETCACHE_BINDINGS
   luaCtx.registerFunction<std::string(std::shared_ptr<DNSDistPacketCache>::*)()const>("toString", [](const std::shared_ptr<DNSDistPacketCache>& cache) {
       if (cache) {
         return cache->toString();
@@ -211,4 +213,5 @@ void setupLuaBindingsPacketCache(LuaContext& luaCtx, bool client)
         g_outputBuffer += "Dumped " + std::to_string(records) + " records\n";
       }
     });
+#endif /* DISABLE_PACKETCACHE_BINDINGS */
 }
index 4b5c20bd5c031c5e665c389e10bd05ea1f9592b1..379402f4a81b9fa5d85af463690f772ae851c317 100644 (file)
@@ -29,6 +29,7 @@ void registerWebHandler(const std::string& endpoint, std::function<void(const Ya
 
 void setupLuaWeb(LuaContext& luaCtx)
 {
+#ifndef DISABLE_LUA_WEB_HANDLERS
   luaCtx.writeFunction("registerWebHandler", [](const std::string& path, std::function<void(const YaHTTP::Request*, YaHTTP::Response*)> handler) {
     /* LuaWrapper does a copy for objects passed by reference, so we pass a pointer */
     registerWebHandler(path, [handler](const YaHTTP::Request& req, YaHTTP::Response& resp) { handler(&req, &resp); });
@@ -75,5 +76,6 @@ void setupLuaWeb(LuaContext& luaCtx)
       resp.headers.insert({entry.first, entry.second});
     }
   });
+#endif /* DISABLE_LUA_WEB_HANDLERS */
 }