mirror of
https://gitgud.io/fatchan/haproxy-protection.git
synced 2025-05-09 02:05:37 +00:00
dont run setup_servers without the env vars
This commit is contained in:
@ -19,6 +19,9 @@ local captcha_map = Map.new("/etc/haproxy/ddos.map", Map._str);
|
||||
function _M.setup_servers()
|
||||
local backend_name = os.getenv("BACKEND_NAME")
|
||||
local server_prefix = os.getenv("SERVER_PREFIX")
|
||||
if backend_name == nil or server_prefix == nil then
|
||||
return;
|
||||
end
|
||||
local hosts_map = Map.new("/etc/haproxy/hosts.map", Map._str);
|
||||
local handle = io.open("/etc/haproxy/hosts.map", "r")
|
||||
local line = handle:read("*line")
|
||||
|
Reference in New Issue
Block a user