aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_websocket.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_websocket.lua')
-rw-r--r--plugins/mod_websocket.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/mod_websocket.lua b/plugins/mod_websocket.lua
index edc104df..d301088e 100644
--- a/plugins/mod_websocket.lua
+++ b/plugins/mod_websocket.lua
@@ -256,6 +256,10 @@ function handle_request(event)
local session = sessions[conn];
+ -- Use upstream IP if a HTTP proxy was used
+ -- See mod_http and #540
+ session.ip = request.ip;
+
session.secure = consider_websocket_secure or session.secure;
session.websocket_request = request;