plugins - started basic plugin system

This commit is contained in:
bunkerity
2021-06-04 17:42:34 +02:00
parent 62217a3210
commit 388fc1a0e8
9 changed files with 56 additions and 12 deletions

View File

@@ -291,6 +291,15 @@ if use_antibot_recaptcha and ngx.var.uri ~= "/favicon.ico" then
end
end
-- plugins check
local plugins, flags = ngx.shared.plugins_data:get("plugins")
if plugins ~= nil then
for plugin_id in string.gmatch(plugins, "%w+") do
local plugin = require(plugin_id .. "/" .. plugin_id)
plugin.check()
end
end
ngx.exit(ngx.OK)
}