Changeset

2349:48686b399a88

mod_proxy65_whitelist: Add proxy hosts enabled after module is loaded (fixes #494)
author Kim Alvefur <zash@zash.se>
date Mon, 07 Nov 2016 17:35:11 +0100
parents 2348:1903add39b7c
children 2350:67990e045d4f
files mod_proxy65_whitelist/mod_proxy65_whitelist.lua
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_proxy65_whitelist/mod_proxy65_whitelist.lua	Mon Nov 07 17:27:18 2016 +0100
+++ b/mod_proxy65_whitelist/mod_proxy65_whitelist.lua	Mon Nov 07 17:35:11 2016 +0100
@@ -8,6 +8,12 @@
 	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;