better request.requires_https, thanks Yarin and Niphlod

This commit is contained in:
Massimo committed 2012-10-03 12:32:12 -05:00
1 parent 2b99fd0ba6
commit d026b39988
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -128,6 +128,7 @@ class Request(Storage):
and secure the session.
"""
if not global_settings.cronjob and not self.is_https:
session.forget()
redirect(URL(scheme='https', args=self.args, vars=self.vars))
current.session.secure()