From e2f8d0b70fc3a9b740a2836fa841159e01bf473f Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 4 Feb 2022 17:59:42 +0100 Subject: 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 --- plugins/mod_websocket.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/mod_websocket.lua') 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 -- cgit v1.2.3