Software /
code /
prosody
Comparison
plugins/mod_websocket.lua @ 11384:f9edf26c66fc
mod_websocket: Inherit security status from http request
Allows requests considered secure becasue of a proxy header to carry
over to the client session.
mod_bosh does this too.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 18 Feb 2021 10:05:30 +0100 |
parent | 11114:6a608ecb3471 |
child | 11393:e6122e6a40a0 |
comparison
equal
deleted
inserted
replaced
11383:98b7ae7064b2 | 11384:f9edf26c66fc |
---|---|
264 | 264 |
265 -- Use upstream IP if a HTTP proxy was used | 265 -- Use upstream IP if a HTTP proxy was used |
266 -- See mod_http and #540 | 266 -- See mod_http and #540 |
267 session.ip = request.ip; | 267 session.ip = request.ip; |
268 | 268 |
269 session.secure = consider_websocket_secure or session.secure; | 269 session.secure = consider_websocket_secure or request.secure or session.secure; |
270 session.websocket_request = request; | 270 session.websocket_request = request; |
271 | 271 |
272 session.open_stream = session_open_stream; | 272 session.open_stream = session_open_stream; |
273 session.close = session_close; | 273 session.close = session_close; |
274 | 274 |