plugins - started basic plugin system
This commit is contained in:
@@ -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)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user