aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-06-10 13:06:05 +0200
committerKim Alvefur <zash@zash.se>2023-06-10 13:06:05 +0200
commit0d6c625f935a28a94ae8893747d4fdbeb1e53d87 (patch)
tree1c09cfece49e4356e64681c5d5ac8412d421af7f
parent57dd3340b03320a68b3f2f5791b28b2cb4aa242a (diff)
parent960f406662c436762033ce13422eb030d3a52f61 (diff)
downloadprosody-0d6c625f935a28a94ae8893747d4fdbeb1e53d87.tar.gz
prosody-0d6c625f935a28a94ae8893747d4fdbeb1e53d87.zip
Merge 0.12->trunk
-rw-r--r--plugins/mod_http.lua2
-rw-r--r--util/array.lua2
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);