diff --git a/lib/routelib/routelib.lua b/lib/routelib/routelib.lua index 99cc084..7f3507c 100644 --- a/lib/routelib/routelib.lua +++ b/lib/routelib/routelib.lua @@ -536,7 +536,7 @@ end -- routes that have stats should assign stats or global overrides in this conf -- stage. -- NOTE: we are editing the entries in-place -local function main_configure_router(set, pools, c_in) +local function main_configure_router(set, pools, c_in, tag) -- create ctx object to hold label + command local ctx = { label = function(self) @@ -545,6 +545,9 @@ local function main_configure_router(set, pools, c_in) cmd = function(self) return self._cmd end, + listen_tag = function(self) + return self._listen_tag + end, check_child = function(self, child) -- ensure this child is a string of a valid pool if type(child) ~= "string" then @@ -610,6 +613,7 @@ local function main_configure_router(set, pools, c_in) return id end } + ctx._listen_tag = tag if set.map then -- a prefix map @@ -679,7 +683,7 @@ local function main_routes_parse(c_in, pools) end end - main_configure_router(set, pools, c_in) + main_configure_router(set, pools, c_in, tag) found = true end