aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-02-04 17:59:42 +0100
committerKim Alvefur <zash@zash.se>2022-02-04 17:59:42 +0100
commite2f8d0b70fc3a9b740a2836fa841159e01bf473f (patch)
tree989d746fe10d634837badc015691d62b8aba6896 /plugins
parent89ace39a312a1cf7644c2270e15d3fdec1c58a95 (diff)
downloadprosody-e2f8d0b70fc3a9b740a2836fa841159e01bf473f.tar.gz
prosody-e2f8d0b70fc3a9b740a2836fa841159e01bf473f.zip
mod_websocket: Only enable host-agnostic HTTP routing when enabled globally
This way the host-agnostic http://*:5280/ handler is not enabled, but BOSH can still be used with any local VirtualHost Ref #1712
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_websocket.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_websocket.lua b/plugins/mod_websocket.lua
index f0134b4a..c4f172fc 100644
--- a/plugins/mod_websocket.lua
+++ b/plugins/mod_websocket.lua
@@ -364,4 +364,6 @@ function module.add_host(module)
module:hook("c2s-read-timeout", keepalive, -0.9);
end
-module:add_host();
+if require"core.modulemanager".get_modules_for_host("*"):contains(module.name) then
+ module:add_host();
+end