Changeset

12263:168970ce8543

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
author Kim Alvefur <zash@zash.se>
date Fri, 04 Feb 2022 17:59:42 +0100
parents 12262:50525021c2c7
children 12264:ba712f7559dc
files plugins/mod_websocket.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_websocket.lua	Fri Feb 04 17:52:13 2022 +0100
+++ b/plugins/mod_websocket.lua	Fri Feb 04 17:59:42 2022 +0100
@@ -364,4 +364,6 @@
 	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