From e4a558af4650391aff0c02a846884b4919ce87ad Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 15 Mar 2018 17:52:11 +0100 Subject: mod_websocket: Transfer IP address derived by mod_http --- plugins/mod_websocket.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins') diff --git a/plugins/mod_websocket.lua b/plugins/mod_websocket.lua index ed73962d..4f43cb7b 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.open_stream = session_open_stream; -- cgit v1.2.3