Software /
code /
prosody
Diff
plugins/mod_websocket.lua @ 8595:d3bbff01df9d
mod_websocket: Transfer IP address derived by mod_http
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 15 Mar 2018 17:52:11 +0100 |
parent | 8145:4d0f5ea19851 |
child | 8794:0e2c1c4d4f78 |
line wrap: on
line diff
--- 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;