diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-07-12 19:16:13 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-07-12 19:16:13 +0100 |
commit | 2365233a56a835ce38899524a9a50acdf53d8ff7 (patch) | |
tree | afad181f3a9ea9cb6cc7e234947a0f23565779f6 | |
parent | 4117259212afab1c15f98eaeffb8c442cfa54c8c (diff) | |
download | prosody-2365233a56a835ce38899524a9a50acdf53d8ff7.tar.gz prosody-2365233a56a835ce38899524a9a50acdf53d8ff7.zip |
net.httpserver: Mark a request as secure if it is made using HTTPS
-rw-r--r-- | net/httpserver_listener.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/httpserver_listener.lua b/net/httpserver_listener.lua index 48ade157..455191fb 100644 --- a/net/httpserver_listener.lua +++ b/net/httpserver_listener.lua @@ -22,6 +22,11 @@ function httpserver.listener(conn, data) 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 |