Commit 288c50ad authored by Petr Špaček's avatar Petr Špaček

http: new function to merge config sets

parent 5f4a92c7
......@@ -279,6 +279,18 @@ local function updatecert(crtfile, keyfile)
return crt, key
end
-- @function Merge dictionaries.
-- Values from right-hand side dictionaries take precedence.
function M.mergeconf(...)
local merged = {}
for _, intable in ipairs({...}) do
for key, val in pairs(intable) do
merged[key] = val
end
end
return merged
end
-- @function Listen on given HTTP(s) host
function M.add_interface(conf)
local crt, key, ephemeral
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment