Comparison

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
comparison
equal deleted inserted replaced
8594:b4a0bc46c82d 8595:d3bbff01df9d
254 conn:setlistener(c2s_listener); 254 conn:setlistener(c2s_listener);
255 c2s_listener.onconnect(conn); 255 c2s_listener.onconnect(conn);
256 256
257 local session = sessions[conn]; 257 local session = sessions[conn];
258 258
259 -- Use upstream IP if a HTTP proxy was used
260 -- See mod_http and #540
261 session.ip = request.ip;
262
259 session.secure = consider_websocket_secure or session.secure; 263 session.secure = consider_websocket_secure or session.secure;
260 264
261 session.open_stream = session_open_stream; 265 session.open_stream = session_open_stream;
262 session.close = session_close; 266 session.close = session_close;
263 267