# HG changeset patch # User Kim Alvefur # Date 1521132731 -3600 # Node ID d3bbff01df9d5b2f8a37adb85da474266adc0346 # Parent b4a0bc46c82ddb835c984228332ebe2488392f9e mod_websocket: Transfer IP address derived by mod_http diff -r b4a0bc46c82d -r d3bbff01df9d plugins/mod_websocket.lua --- a/plugins/mod_websocket.lua Thu Mar 15 17:22:49 2018 +0100 +++ b/plugins/mod_websocket.lua Thu Mar 15 17:52:11 2018 +0100 @@ -256,6 +256,10 @@ 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;