mirror of
https://gitgud.io/fatchan/haproxy-protection.git
synced 2025-05-09 02:05:37 +00:00
add missing map
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package.path = package.path .. "./?.lua;/etc/haproxy/scripts/?.lua;/etc/haproxy/libs/?.lua"
|
package.path = package.path .. "./?.lua;/etc/haproxy/scripts/?.lua;/etc/haproxy/libs/?.lua"
|
||||||
|
|
||||||
local pow_difficulty = tonumber(os.getenv("POW_DIFFICULTY") or 18)
|
local pow_difficulty = tonumber(os.getenv("POW_DIFFICULTY") or 18)
|
||||||
|
local backends_map = Map.new('/etc/haproxy/map/backends.map', Map._str)
|
||||||
local utils = require("utils")
|
local utils = require("utils")
|
||||||
|
|
||||||
-- setup initial server backends based on hosts.map
|
-- setup initial server backends based on hosts.map
|
||||||
@@ -31,7 +32,7 @@ function setup_servers()
|
|||||||
new_map_value = new_map_value .. "," .. existing_map_value
|
new_map_value = new_map_value .. "," .. existing_map_value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
core.set_map("/etc/haproxy/map/backends.map", domain, server_prefix..counter)
|
core.set_map("/etc/haproxy/map/backends.map", domain, new_map_value)
|
||||||
local server_name = "servers/websrv"..counter
|
local server_name = "servers/websrv"..counter
|
||||||
--NOTE: if you have a proper CA setup,
|
--NOTE: if you have a proper CA setup,
|
||||||
if verify_backend_ssl ~= nil then
|
if verify_backend_ssl ~= nil then
|
||||||
|
Reference in New Issue
Block a user