mirror of
https://gitgud.io/fatchan/haproxy-protection.git
synced 2025-05-09 02:05:37 +00:00
Fix the fetch context in server selection not having txn.cdn available, pull from header directly instead
This commit is contained in:
@@ -7,7 +7,8 @@ local backends_map = Map.new('/etc/haproxy/map/backends.map', Map._str)
|
|||||||
|
|
||||||
function get_server_names(txn)
|
function get_server_names(txn)
|
||||||
local key = txn.sf:hdr("Host")
|
local key = txn.sf:hdr("Host")
|
||||||
local user_cn = txn:get_var("txn.xcn") or "XX"
|
-- local user_cn = txn:get_var("txn.xcn") or "XX"
|
||||||
|
local user_cn = txn.sf:hdr("X-Continent-Code") or "XX"
|
||||||
local value = backends_map:lookup(key or "")
|
local value = backends_map:lookup(key or "")
|
||||||
if value ~= nil then
|
if value ~= nil then
|
||||||
local filtered_backends = {}
|
local filtered_backends = {}
|
||||||
|
Reference in New Issue
Block a user