mirror of
https://gitgud.io/fatchan/haproxy-protection.git
synced 2025-05-09 02:05:37 +00:00
Support multiple backends per domain with the help of some lua
This commit is contained in:
@@ -41,6 +41,14 @@ function _M.split(inputstr, sep)
|
||||
return t
|
||||
end
|
||||
|
||||
-- check if elem in list
|
||||
function _M.contains(list, elem)
|
||||
for _, v in pairs(list) do
|
||||
if v == elem then return true end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
-- return true if hash passes difficulty
|
||||
function _M.checkdiff(hash, diff)
|
||||
if #hash == 0 then
|
||||
|
Reference in New Issue
Block a user