diff options
author | Kim Alvefur <zash@zash.se> | 2022-02-04 17:59:42 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2022-02-04 17:59:42 +0100 |
commit | e2f8d0b70fc3a9b740a2836fa841159e01bf473f (patch) | |
tree | 989d746fe10d634837badc015691d62b8aba6896 /plugins/mod_websocket.lua | |
parent | 89ace39a312a1cf7644c2270e15d3fdec1c58a95 (diff) | |
download | prosody-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/mod_websocket.lua')
-rw-r--r-- | plugins/mod_websocket.lua | 4 |
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 |