From f8d61d21e5521c7ef5863fde23500298cc21467d Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 22 Jan 2019 10:41:00 +0100 Subject: mod_websocket: Log an error if cross_domain_websocket = true is set in a VirtualHost section --- plugins/mod_websocket.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'plugins/mod_websocket.lua') diff --git a/plugins/mod_websocket.lua b/plugins/mod_websocket.lua index 475cabfe..b4aba338 100644 --- a/plugins/mod_websocket.lua +++ b/plugins/mod_websocket.lua @@ -338,6 +338,11 @@ function module.add_host(module) url_components.path = nil; local this_origin = url.build(url_components); local local_cross_domain = module:get_option_set("cross_domain_websocket", { this_origin }); + if local_cross_domain:contains(true) then + module:log("error", "cross_domain_websocket = true only works in the global section"); + return; + end + -- Don't add / remove something added by another host -- This might be weird with random load order local_cross_domain:exclude(cross_domain); -- cgit v1.2.3