From 2f42619303627db401e469e2fd65123cd794a378 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Thu, 9 Apr 2020 11:38:48 +0200 Subject: Load only configured plugins, add plugins --- config.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'config.cpp') diff --git a/config.cpp b/config.cpp index baf611b..0d1eb34 100644 --- a/config.cpp +++ b/config.cpp @@ -215,3 +215,14 @@ std::string Config::DocRoot(const Socket& socket, const std::string& requested_h return result; } +bool Config::PluginIsConfigured(const std::string& name) const +{ + for (const auto& site: m_sites) { + for (const auto& path: site.paths) { + if (path.params.find("plugin") != path.params.end()) + return true; + } + } + return false; +} + -- cgit v1.2.3