mirror of
https://gitgud.io/fatchan/haproxy-protection.git
synced 2025-05-09 02:05:37 +00:00
Fully convert to data plane api
Change global ACL to a map to realtime update with data plane api Change how on setartup servers are registered in lua
This commit is contained in:
9
src/lua/scripts/register-bot-check.lua
Normal file
9
src/lua/scripts/register-bot-check.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
package.path = package.path .. "./?.lua;/etc/haproxy/scripts/?.lua;/etc/haproxy/libs/?.lua"
|
||||
|
||||
local bot_check = require("bot-check")
|
||||
|
||||
core.register_service("bot-check", "http", bot_check.view)
|
||||
core.register_action("captcha-check", { 'http-req', }, bot_check.check_captcha_status)
|
||||
core.register_action("pow-check", { 'http-req', }, bot_check.check_pow_status)
|
||||
core.register_action("decide-checks-necessary", { 'http-req', }, bot_check.decide_checks_necessary)
|
||||
core.register_action("kill-tor-circuit", { 'http-req', }, bot_check.kill_tor_circuit)
|
Reference in New Issue
Block a user