diff options
-rw-r--r-- | plugins/mod_http.lua | 2 | ||||
-rw-r--r-- | util/array.lua | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua index e85f4201..b52f4b44 100644 --- a/plugins/mod_http.lua +++ b/plugins/mod_http.lua @@ -155,7 +155,7 @@ function module.add_host(module) local app_credentials = opt_credentials; local app_origins; if opt_origins and not (opt_origins:empty() or opt_origins:contains("*")) then - opt_origins = opt_origins._items; + app_origins = opt_origins._items; end local function cors_handler(event_data) diff --git a/util/array.lua b/util/array.lua index fd8dd8be..aa06557d 100644 --- a/util/array.lua +++ b/util/array.lua @@ -36,6 +36,8 @@ local function new_array(self, t, _s, _var) return setmetatable(t or {}, array_mt); end +array.new = new_array; + function array_mt.__add(a1, a2) local res = new_array(); return res:append(a1):append(a2); |