Software /
code /
prosody
Changeset
1540:19fb86c19a59
net.httpserver: Mark a request as secure if it is made using HTTPS
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 12 Jul 2009 19:16:13 +0100 |
parents | 1538:dff620405503 |
children | 1541:591732da1306 |
files | net/httpserver_listener.lua |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/net/httpserver_listener.lua Sun Jul 12 15:22:37 2009 +0100 +++ b/net/httpserver_listener.lua Sun Jul 12 19:16:13 2009 +0100 @@ -22,6 +22,11 @@ if not request then request = new_request(conn); requests[conn] = request; + + -- If using HTTPS, request is secure + if conn.ssl() then + request.secure = true; + end end if data then