# HG changeset patch # User Kim Alvefur # Date 1548150060 -3600 # Node ID 7bfc4269dc36e4f51ceffa9b0b9c71388a693448 # Parent 5c5117d41133e3ac4ce412d6f72157fdeb1f6551 mod_websocket: Log an error if cross_domain_websocket = true is set in a VirtualHost section diff -r 5c5117d41133 -r 7bfc4269dc36 plugins/mod_websocket.lua --- a/plugins/mod_websocket.lua Fri Jan 18 18:37:04 2019 +0100 +++ b/plugins/mod_websocket.lua Tue Jan 22 10:41:00 2019 +0100 @@ -338,6 +338,11 @@ 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);