Software /
code /
prosody
Changeset
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 |
parents | 8594:b4a0bc46c82d |
children | 8596:71da54c7f797 |
files | plugins/mod_websocket.lua |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
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;