mod_proxy65_whitelist: Only add proxy hosts enabled after module is loaded if allow_local_streamhosts = true
--- a/mod_proxy65_whitelist/mod_proxy65_whitelist.lua Wed Nov 09 13:38:44 2016 +0100
+++ b/mod_proxy65_whitelist/mod_proxy65_whitelist.lua Wed Nov 09 14:11:16 2016 +0100
@@ -6,14 +6,14 @@
allowed_streamhosts:add(hostname);
end
end
+
+ module:hook_global("host-activated", function (host)
+ if hosts[host].modules.proxy65 then
+ allowed_streamhosts:add(host);
+ end
+ end);
end
-module:hook_global("host-activated", function (host)
- if hosts[host].modules.proxy65 then
- allowed_streamhosts:add(host);
- end
-end);
-
local function filter_streamhosts(tag)
if tag.name == "streamhost" and not allowed_streamhosts:contains(tag.attr.jid) then
return nil;